Exemple #1
0
 /**
  * @dataProvider routeProvider
  * @param        Literal $route
  * @param        string  $path
  * @param        integer $offset
  * @param        boolean $shouldMatch
  */
 public function testAssembling(Literal $route, $path, $offset, $shouldMatch)
 {
     if (!$shouldMatch) {
         // Data which will not match are not tested for assembling.
         return;
     }
     $result = $route->assemble();
     if ($offset !== null) {
         $this->assertEquals($offset, strpos($path, $result, $offset));
     } else {
         $this->assertEquals($path, $result);
     }
 }
Exemple #2
0
 public function testGetAssembledParams()
 {
     $route = new Literal('/foo');
     $route->assemble(array('foo' => 'bar'));
     $this->assertEquals(array(), $route->getAssembledParams());
 }