public function DynamicRouterTest::testGenerate

File

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

Class

DynamicRouterTest

Namespace

Symfony\Cmf\Component\Routing\Tests\Routing

Code

public function testGenerate() {
  $name = 'my_route_name';
  $parameters = array(
    'foo' => 'bar',
  );
  $absolute = true;
  $this->generator
    ->expects($this
    ->once())
    ->method('generate')
    ->with($name, $parameters, $absolute)
    ->will($this
    ->returnValue('http://test'));
  $url = $this->router
    ->generate($name, $parameters, $absolute);
  $this
    ->assertEquals('http://test', $url);
}