kahlan\matcher\ToThrow::actual PHP Method

actual() public static method

Normalise the actual value as an Exception.
public static actual ( mixed $actual ) : mixed
$actual mixed The actual value to be normalized.
return mixed The normalised value.
    public static function actual($actual)
    {
        try {
            $actual();
        } catch (Exception $e) {
            return $e;
        }
    }