You are here

public function RouteCompilerTest::testCompile in Zircon Profile 8

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

@dataProvider provideCompileData

File

vendor/symfony/routing/Tests/RouteCompilerTest.php, line 21

Class

RouteCompilerTest

Namespace

Symfony\Component\Routing\Tests

Code

public function testCompile($name, $arguments, $prefix, $regex, $variables, $tokens) {
  $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, $compiled
    ->getRegex(), $name . ' (regex)');
  $this
    ->assertEquals($variables, $compiled
    ->getVariables(), $name . ' (variables)');
  $this
    ->assertEquals($tokens, $compiled
    ->getTokens(), $name . ' (tokens)');
}