code: private function forceToExpectation($exception)
      {
          if ($exception === false) {
              return new AnythingExpectation();
          }
          if (! SimpleExpectation::isExpectation($exception)) {
              return new ExceptionExpectation($exception);
          }
  
          return $exception;
      }
docs: Turns an expected exception into a SimpleExpectation object.
  
  @param mixed $exception      Exception, expectation or class name of exception.
  
  @return SimpleExpectation    Expectation that will match the exception.