You are here

public function RedirectableUrlMatcherTest::testRedirectWhenNoSlash in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php \Symfony\Component\Routing\Tests\Matcher\RedirectableUrlMatcherTest::testRedirectWhenNoSlash()

File

vendor/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php, line 20

Class

RedirectableUrlMatcherTest

Namespace

Symfony\Component\Routing\Tests\Matcher

Code

public function testRedirectWhenNoSlash() {
  $coll = new RouteCollection();
  $coll
    ->add('foo', new Route('/foo/'));
  $matcher = $this
    ->getMockForAbstractClass('Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcher', array(
    $coll,
    new RequestContext(),
  ));
  $matcher
    ->expects($this
    ->once())
    ->method('redirect');
  $matcher
    ->match('/foo');
}