Example #1
0
 public function testMethodName()
 {
     $this->assertEquals('index', $this->view->getMethod());
     $this->view->setScriptName('noSuchMethod');
     $this->assertEquals('noSuchMethod', $this->view->getMethod());
     $this->assertEquals('noSuchMethod', $this->view->getScriptName());
     $this->view->setMethod('noSuchMethodAlt');
     $this->assertEquals('noSuchMethodAlt', $this->view->getMethod());
     $this->assertEquals('noSuchMethodAlt', $this->view->getScriptName());
 }
Example #2
0
 /**
  * When you need to send a not found in your runnable, you
  * can call this directly.
  * Optionally, you can specify the package name, class name,
  * and method name to render accordingly.
  * @param sring $package (optional) default 'DefaultPackage'
  * @param sring $class (optional) default 'Error'
  * @param sring $method (optional) default 'notFound'
  * @return void
  */
 public function notFound($package = 'DefaultPackage', $class = 'Error', $method = 'notFound')
 {
     $this->response->setStatus(404);
     $this->view->setPackage($package);
     $this->view->setClass($class);
     $this->view->setScriptName($method);
     return;
 }