public function testMatch() { $context = new RequestContext('/app_dev.php', 'GET', 'localhost', 'https'); $mockedRouter = $this->prophesize('Symfony\\Component\\Routing\\RouterInterface'); $mockedRouter->getContext()->willReturn($context)->shouldBeCalled(); $mockedRouter->setContext(Argument::type('Symfony\\Component\\Routing\\RequestContext'))->shouldBeCalled(); $mockedRouter->setContext($context)->shouldBeCalled(); $mockedRouter->match('/foo')->willReturn(['bar'])->shouldBeCalled(); $router = new Router($mockedRouter->reveal()); $this->assertEquals(['bar'], $router->match('/app_dev.php/foo')); }