public function ProviderBasedGeneratorTest::testGenerateFromName

File

drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/ProviderBasedGeneratorTest.php, line 31

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