public function UrlMatcherTest::testMatchWithPrefixes

File

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

Class

UrlMatcherTest

Namespace

Symfony\Component\Routing\Tests\Matcher

Code

public function testMatchWithPrefixes() {
  $collection = new RouteCollection();
  $collection
    ->add('foo', new Route('/{foo}'));
  $collection
    ->addPrefix('/b');
  $collection
    ->addPrefix('/a');
  $matcher = new UrlMatcher($collection, new RequestContext());
  $this
    ->assertEquals(array(
    '_route' => 'foo',
    'foo' => 'foo',
  ), $matcher
    ->match('/a/b/foo'));
}