public function ChainRouterTest::testSupport

@expectedException \Symfony\Component\Routing\Exception\RouteNotFoundException

File

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

Class

ChainRouterTest

Namespace

Symfony\Cmf\Component\Routing\Tests\Routing

Code

public function testSupport() {
  $router = $this
    ->getMock('Symfony\\Cmf\\Component\\Routing\\ChainedRouterInterface');
  $router
    ->expects($this
    ->once())
    ->method('supports')
    ->will($this
    ->returnValue(false));
  $router
    ->expects($this
    ->never())
    ->method('generate')
    ->will($this
    ->returnValue(false));
  $this->router
    ->add($router);
  $this->router
    ->generate('foobar');
}