File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -220,16 +220,17 @@ public function testDefaultValuesAsNonStrings($value)
220220
221221 public function testGetRouteCollectionAddsContainerParametersResource ()
222222 {
223- $ routeCollection = $ this ->getMockBuilder (RouteCollection::class)->getMock ();
224- $ routeCollection ->method ('getIterator ' )->willReturn (new \ArrayIterator (array (new Route ('/%locale% ' ))));
225- $ routeCollection ->expects ($ this ->once ())->method ('addResource ' )->with (new ContainerParametersResource (array ('locale ' => 'en ' )));
223+ $ routeCollection = new RouteCollection ();
224+ $ routeCollection ->add ('foo ' , new Route ('/%locale% ' ));
226225
227226 $ sc = $ this ->getServiceContainer ($ routeCollection );
228227 $ sc ->setParameter ('locale ' , 'en ' );
229228
230229 $ router = new Router ($ sc , 'foo ' );
231230
232- $ router ->getRouteCollection ();
231+ $ routeCollection = $ router ->getRouteCollection ();
232+
233+ $ this ->assertEquals (array (new ContainerParametersResource (array ('locale ' => 'en ' ))), $ routeCollection ->getResources ());
233234 }
234235
235236 public function getNonStringValues ()
You can’t perform that action at this time.
0 commit comments