public function ChainRouterTest::testPriority

File

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

Class

ChainRouterTest

Namespace

Symfony\Cmf\Component\Routing\Tests\Routing

Code

public function testPriority() {
  $this
    ->assertEquals(array(), $this->router
    ->all());
  list($low, $high) = $this
    ->createRouterMocks();
  $this->router
    ->add($low, 10);
  $this->router
    ->add($high, 100);
  $this
    ->assertEquals(array(
    $high,
    $low,
  ), $this->router
    ->all());
}