You are here

public function RouteCompilerTest::testGetFit in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php \Drupal\Tests\Core\Routing\RouteCompilerTest::testGetFit()

Tests RouteCompiler::getFit().

@dataProvider providerTestGetFit

Parameters

string $path: A path whose fit will be calculated in the test.

int $expected: The expected fit returned by RouteCompiler::getFit()

File

core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php, line 31
Contains \Drupal\Tests\Core\Routing\RouteCompilerTest.

Class

RouteCompilerTest
@coversDefaultClass \Drupal\Core\Routing\RouteCompiler @group Routing

Namespace

Drupal\Tests\Core\Routing

Code

public function testGetFit($path, $expected) {
  $route_compiler = new RouteCompiler();
  $result = $route_compiler
    ->getFit($path);
  $this
    ->assertSame($expected, $result);
}