You are here

public function DynamicRouterTest::testGenerate in Zircon Profile 8.0

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

File

vendor/symfony-cmf/routing/Tests/Routing/DynamicRouterTest.php, line 88

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