Esempio n. 1
0
 /**
  * @covers Zap\Routing\Router::setRouteCollection
  */
 public function testFetch()
 {
     $result = Router::get()->fetch('/some/uri', 'GET');
     $this->assertNull($result);
     // @todo extend test case, once method can return Zap\Http\Response
 }
Esempio n. 2
0
 /**
  * Registers route against router
  * @param Router|null $router
  * @return IRoute
  */
 public function register(Router $router = null) : IRoute
 {
     $router = is_null($router) ? Router::get() : $router;
     $router->addRoute($this);
     return $this;
 }