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)
220
220
221
221
public function testGetRouteCollectionAddsContainerParametersResource ()
222
222
{
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% ' ));
226
225
227
226
$ sc = $ this ->getServiceContainer ($ routeCollection );
228
227
$ sc ->setParameter ('locale ' , 'en ' );
229
228
230
229
$ router = new Router ($ sc , 'foo ' );
231
230
232
- $ router ->getRouteCollection ();
231
+ $ routeCollection = $ router ->getRouteCollection ();
232
+
233
+ $ this ->assertEquals (array (new ContainerParametersResource (array ('locale ' => 'en ' ))), $ routeCollection ->getResources ());
233
234
}
234
235
235
236
public function getNonStringValues ()
You can’t perform that action at this time.
0 commit comments