Example #1
0
 /**
  * build
  *
  * @param Route $route
  * @param array $data
  *
  * @return  string
  */
 public function build(Route $route, $data = array())
 {
     return BasicGenerator::generate($route->getPattern(), $data);
 }
 /**
  * Method to test generate().
  *
  * @return void
  *
  * @covers Windwalker\Router\Compiler\BasicGenerator::generate
  *
  * @dataProvider  regexList
  */
 public function testGenerate($pattern, $data, $expected, $line)
 {
     $this->assertEquals($expected, BasicGenerator::generate($pattern, $data), 'Fail at: ' . $line);
 }