ApiPlatform\Core\Tests\Bridge\Symfony\Routing\RouterTest::testGenerate PHP 메소드

testGenerate() 공개 메소드

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'));
    }