File tree 1 file changed +5
-9
lines changed
src/Symfony/Component/HttpKernel/Tests/Debug 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 13
13
14
14
use PHPUnit \Framework \TestCase ;
15
15
use Symfony \Component \HttpKernel \Debug \FileLinkFormatter ;
16
- use Symfony \Component \Routing \Loader \ClosureLoader ;
16
+ use Symfony \Component \Routing \Generator \UrlGenerator ;
17
+ use Symfony \Component \Routing \RequestContext ;
17
18
use Symfony \Component \Routing \Route ;
18
19
use Symfony \Component \Routing \RouteCollection ;
19
- use Symfony \Component \Routing \Router ;
20
20
21
21
class FileLinkFormatterTest extends TestCase
22
22
{
@@ -60,13 +60,9 @@ public function testWhenNoFileLinkFormatAndRouter()
60
60
61
61
private function getRouter ()
62
62
{
63
- $ routeCollection = function () {
64
- $ routes = new RouteCollection ();
65
- $ routes->add ('_profiler_open_file ' , new Route ('/_profiler_customized ' ));
63
+ $ routes = new RouteCollection ();
64
+ $ routes ->add ('_profiler_open_file ' , new Route ('/_profiler_customized ' ));
66
65
67
- return $ routes ;
68
- };
69
-
70
- return new Router (new ClosureLoader (), $ routeCollection );
66
+ return new UrlGenerator ($ routes , new RequestContext ());
71
67
}
72
68
}
You can’t perform that action at this time.
0 commit comments