public function RouteTest::testLegacySchemeRequirement in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/routing/Tests/RouteTest.php \Symfony\Component\Routing\Tests\RouteTest::testLegacySchemeRequirement()
@group legacy
File
- vendor/
symfony/ routing/ Tests/ RouteTest.php, line 170
Class
Namespace
Symfony\Component\Routing\TestsCode
public function testLegacySchemeRequirement() {
$route = new Route('/');
$route
->setRequirement('_scheme', 'http|https');
$this
->assertEquals('http|https', $route
->getRequirement('_scheme'));
$this
->assertEquals(array(
'http',
'https',
), $route
->getSchemes());
$this
->assertTrue($route
->hasScheme('https'));
$this
->assertTrue($route
->hasScheme('http'));
$this
->assertFalse($route
->hasScheme('ftp'));
$route
->setSchemes(array(
'hTTp',
));
$this
->assertEquals('http', $route
->getRequirement('_scheme'));
$route
->setSchemes(array());
$this
->assertNull($route
->getRequirement('_scheme'));
}