ApiPlatform\Core\Tests\Bridge\Symfony\Routing\RouterTest::testGenerate PHP Method

testGenerate() public method

public testGenerate ( )
    public function testGenerate()
    {
        $mockedRouter = $this->prophesize('Symfony\\Component\\Routing\\RouterInterface');
        $mockedRouter->generate('foo', [], RouterInterface::ABSOLUTE_PATH)->willReturn('/bar')->shouldBeCalled();
        $router = new Router($mockedRouter->reveal());
        $this->assertSame('/bar', $router->generate('foo'));
    }