Example #1
0
 /**
  * Router should NOT keep reference to a callback that is not callable
  */
 public function testNotFoundHandlerIfNotCallable()
 {
     $request = new Request();
     $router = new Router($request);
     $notFoundCallback = 'foo';
     $callback = $router->notFound($notFoundCallback);
     $this->assertEquals($callback, null);
 }
Example #2
0
 /**
  * This method is called if a non-existent method (i.e. action) is called on
  * this object.
  */
 public function __call($action, $args)
 {
     Router::notFound();
 }