private function forceToExpectation($exception)
    {
        if ($exception === false) {
            return new AnythingExpectation();
        }
        if (! SimpleExpectation::isExpectation($exception)) {
            return new ExceptionExpectation($exception);
        }

        return $exception;
    }
private function forceToExpectation($exception)
    {
        if ($exception === false) {
            return new AnythingExpectation();
        }
        if (! SimpleExpectation::isExpectation($exception)) {
            return new ExceptionExpectation($exception);
        }

        return $exception;
    }
private function forceToExpectation ( $ exception ) { if ( $ exception === false ) { return new AnythingExpectation ( ) ; } if ( ! SimpleExpectation :: isExpectation ( $ exception ) ) { return new ExceptionExpectation ( $ exception ) ; } return $ exception ; }
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.
Turns an expected exception into a SimpleExpectation object .