kahlan\matcher\ToThrow::expected PHP Метод

expected() публичный статический Метод

Normalise the expected value as an Exception.
public static expected ( mixed $expected, integer $code ) : mixed
$expected mixed The expected value to be normalized.
$code integer The expected `Exception` code if `$expected` is a string.
Результат mixed The normalised value.
    public static function expected($expected, $code = 0)
    {
        if ($expected === null || is_string($expected)) {
            return new AnyException($expected, $code);
        }
        return $expected;
    }