RouteCompiler example

/** * Tests RouteCompiler::getFit(). * * @param string $path * A path whose fit will be calculated in the test. * @param int $expected * The expected fit returned by RouteCompiler::getFit() * * @dataProvider providerTestGetFit */
  public function testGetFit($path$expected) {
    $route_compiler = new RouteCompiler();
    $result = $route_compiler->getFit($path);
    $this->assertSame($expected$result);
  }

  /** * Provides data for RouteCompilerTest::testGetFit() * * @return array * An array of arrays, where each inner array has the path whose fit is to * be calculated as the first value and the expected fit as the second * value. */
Home | Imprint | This part of the site doesn't use cookies.