/**
  * Tests WindActionException->__construct()
  */
 public function test__construct()
 {
     try {
         $this->errorMessage->sendError();
     } catch (WindActionException $e) {
         $this->assertEquals($e->getError(), $this->errorMessage);
         return;
     }
     try {
         throw new WindActionException("error!");
     } catch (Exception $e) {
         $this->assertEquals($e->getMessage(), "error!");
         return;
     }
     $this->fail("WindActionExceptionTest Error");
 }
 /**
  * Tests WindErrorMessage->getErrorAction()
  */
 public function testGetErrorAction()
 {
     $this->assertEquals($this->WindErrorMessage->getErrorAction(), "errorAction");
 }
Exemplo n.º 3
0
 public function postHandle()
 {
     $this->forward->setAction('post_' . $this->forward->getAction());
     $this->errorMessage->addError('post_' . $this->errorMessage->getError(0), 0);
 }