public function andThrow($exception, $message = '', $code = 0, \Exception $previous = null) { $this->_throw = true; if (is_object($exception)) { $this->andReturn($exception); } else { $this->andReturn(new $exception($message, $code, $previous)); } return $this; }
/** * @return $this */ public function andThrow($exception, $message = '', $code = 0, \Exception $previous = null) { $this->expectation->andThrow($exception, $message, $code, $previous); return $this; }