public function ChainRouterTest::testWarmup

File

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

Class

ChainRouterTest

Namespace

Symfony\Cmf\Component\Routing\Tests\Routing

Code

public function testWarmup() {
  $dir = 'test_dir';
  list($low) = $this
    ->createRouterMocks();
  $low
    ->expects($this
    ->never())
    ->method('warmUp');
  $high = $this
    ->getMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\WarmableRouterMock');
  $high
    ->expects($this
    ->once())
    ->method('warmUp')
    ->with($dir);
  $this->router
    ->add($low, 10);
  $this->router
    ->add($high, 100);
  $this->router
    ->warmUp($dir);
}