public function RedirectableUrlMatcherTest::testSchemeRedirectRedirectsToFirstScheme in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php \Symfony\Component\Routing\Tests\Matcher\RedirectableUrlMatcherTest::testSchemeRedirectRedirectsToFirstScheme()
File
- vendor/
symfony/ routing/ Tests/ Matcher/ RedirectableUrlMatcherTest.php, line 44
Class
Namespace
Symfony\Component\Routing\Tests\MatcherCode
public function testSchemeRedirectRedirectsToFirstScheme() {
$coll = new RouteCollection();
$coll
->add('foo', new Route('/foo', array(), array(), array(), '', array(
'FTP',
'HTTPS',
)));
$matcher = $this
->getMockForAbstractClass('Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcher', array(
$coll,
new RequestContext(),
));
$matcher
->expects($this
->once())
->method('redirect')
->with('/foo', 'foo', 'ftp')
->will($this
->returnValue(array(
'_route' => 'foo',
)));
$matcher
->match('/foo');
}