/** * 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); }
/** * This method is called if a non-existent method (i.e. action) is called on * this object. */ public function __call($action, $args) { Router::notFound(); }