Beispiel #1
0
 public function testException()
 {
     $msg = 'bananas';
     $e = new RuntimeException($msg);
     $this->assertTrue($e instanceof Exception);
     $this->assertTrue($e instanceof \RuntimeException);
     $this->assertTrue($e instanceof RuntimeException);
     $this->assertEquals($msg, $e->getMessage());
     $this->assertEquals($msg, $e->getRawMessage());
 }
Beispiel #2
0
 /**
  * Make this bad boy.
  *
  * @param string     $message  (default: "")
  * @param int        $code     (default: 0)
  * @param \Exception $previous (default: null)
  */
 public function __construct($message = "", $code = 0, \Exception $previous = null)
 {
     $this->rawMessage = $message;
     parent::__construct($message, $code, $previous);
 }