public function RouteCompilerTest::testCompileWithHost in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Tests/RouteCompilerTest.php \Symfony\Component\Routing\Tests\RouteCompilerTest::testCompileWithHost()
@dataProvider provideCompileWithHostData
File
- vendor/
symfony/ routing/ Tests/ RouteCompilerTest.php, line 186
Class
Namespace
Symfony\Component\Routing\TestsCode
public function testCompileWithHost($name, $arguments, $prefix, $regex, $variables, $pathVariables, $tokens, $hostRegex, $hostVariables, $hostTokens) {
$r = new \ReflectionClass('Symfony\\Component\\Routing\\Route');
$route = $r
->newInstanceArgs($arguments);
$compiled = $route
->compile();
$this
->assertEquals($prefix, $compiled
->getStaticPrefix(), $name . ' (static prefix)');
$this
->assertEquals($regex, str_replace(array(
"\n",
' ',
), '', $compiled
->getRegex()), $name . ' (regex)');
$this
->assertEquals($variables, $compiled
->getVariables(), $name . ' (variables)');
$this
->assertEquals($pathVariables, $compiled
->getPathVariables(), $name . ' (path variables)');
$this
->assertEquals($tokens, $compiled
->getTokens(), $name . ' (tokens)');
$this
->assertEquals($hostRegex, str_replace(array(
"\n",
' ',
), '', $compiled
->getHostRegex()), $name . ' (host regex)');
$this
->assertEquals($hostVariables, $compiled
->getHostVariables(), $name . ' (host variables)');
$this
->assertEquals($hostTokens, $compiled
->getHostTokens(), $name . ' (host tokens)');
}