andThrow() public method

Set Exception class and arguments to that class to be thrown
public andThrow ( string | Exception $exception, string $message = '', integer $code, Exception $previous = null ) : self
$exception string | Exception
$message string
$code integer
$previous Exception
return self
 /**
  * @return $this
  */
 public function andThrow($exception, $message = '', $code = 0, \Exception $previous = null)
 {
     $this->expectation->andThrow($exception, $message, $code, $previous);
     return $this;
 }