You are here

public function UrlMatcherTest::testMatchWithPrefixes in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php \Symfony\Component\Routing\Tests\Matcher\UrlMatcherTest::testMatchWithPrefixes()

File

vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php, line 133

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'));
}