public function UrlMatcherTest::testMatchingIsEager

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php, line 227

Class

UrlMatcherTest

Namespace

Symfony\Component\Routing\Tests\Matcher

Code

public function testMatchingIsEager() {
  $coll = new RouteCollection();
  $coll
    ->add('test', new Route('/{foo}-{bar}-', array(), array(
    'foo' => '.+',
    'bar' => '.+',
  )));
  $matcher = new UrlMatcher($coll, new RequestContext());
  $this
    ->assertEquals(array(
    'foo' => 'text1-text2-text3',
    'bar' => 'text4',
    '_route' => 'test',
  ), $matcher
    ->match('/text1-text2-text3-text4-'));
}