/**
* Confirms that a route compiles properly with the necessary data.
*/
public function testCompilation() { $route =
new Route('/test/{something}/more'
);
$route->
setOption('compiler_class', RouteCompiler::
class);
$compiled =
$route->
compile();
$this->
assertEquals(5 /* That's 101 binary*/,
$compiled->
getFit(), 'The fit was incorrect.'
);
$this->
assertEquals('/test/%/more',
$compiled->
getPatternOutline(), 'The pattern outline was not correct.'
);
} /**
* Confirms that a compiled route with default values has the correct outline.
*/
public function testCompilationDefaultValue() { // Because "here" has a default value, it should not factor into the outline
// or the fitness.
$route =
new Route('/test/{something}/more/{here}',
[ 'here' => 'there',
]);