You are here

public function ProviderBasedGeneratorTest::testGenerateFromName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony-cmf/routing/Tests/Routing/ProviderBasedGeneratorTest.php \Symfony\Cmf\Component\Routing\Tests\Routing\ProviderBasedGeneratorTest::testGenerateFromName()

File

vendor/symfony-cmf/routing/Tests/Routing/ProviderBasedGeneratorTest.php, line 41

Class

ProviderBasedGeneratorTest

Namespace

Symfony\Cmf\Component\Routing\Tests\Routing

Code

public function testGenerateFromName() {
  $name = 'foo/bar';
  $this->provider
    ->expects($this
    ->once())
    ->method('getRouteByName')
    ->with($name)
    ->will($this
    ->returnValue($this->routeDocument));
  $this->routeDocument
    ->expects($this
    ->once())
    ->method('compile')
    ->will($this
    ->returnValue($this->routeCompiled));
  $this
    ->assertEquals('result_url', $this->generator
    ->generate($name));
}