This commit is contained in:
Nicolas Grekas 2018-03-01 11:49:02 +01:00
parent a06f826a21
commit d1b67a561c

View File

@ -434,9 +434,8 @@ class RouterTest extends TestCase
public function testGetRouteCollectionAddsContainerParametersResourceWithSfContainer() public function testGetRouteCollectionAddsContainerParametersResourceWithSfContainer()
{ {
$routeCollection = $this->getMockBuilder(RouteCollection::class)->getMock(); $routeCollection = new RouteCollection();
$routeCollection->method('getIterator')->willReturn(new \ArrayIterator(array(new Route('/%locale%')))); $routeCollection->add('foo', new Route('/%locale%'));
$routeCollection->expects($this->once())->method('addResource')->with(new ContainerParametersResource(array('locale' => 'en')));
$sc = $this->getServiceContainer($routeCollection); $sc = $this->getServiceContainer($routeCollection);
$sc->setParameter('locale', 'en'); $sc->setParameter('locale', 'en');