Property | Type | Description | |
---|---|---|---|
$_description | array | Description reference of the last ::match() call. |
Method | Description | |
---|---|---|
_buildDescription ( object $actual, object $expected ) | Build the description of the runned ::match() call. | |
_matchException ( object $actual, $exception ) : boolean | Compares if two exception are similar. | |
_sameMessage ( string $actual, string $expected ) : boolean | Compare if exception messages are similar. | |
actual ( mixed $actual ) : mixed | Normalise the actual value as an Exception. | |
description ( ) | Returns the description report. | |
expected ( mixed $expected, integer $code ) : mixed | Normalise the expected value as an Exception. | |
match ( Closure $actual, mixed $expected = null, integer $code ) : boolean | Checks that $actual throws the $expected exception. |
public static _buildDescription ( object $actual, object $expected ) | ||
$actual | object | The actual exception instance. |
$expected | object | The expected exception instance. |
public static _matchException ( object $actual, $exception ) : boolean | ||
$actual | object | The actual instance. |
return | boolean |
public static match ( Closure $actual, mixed $expected = null, integer $code ) : boolean | ||
$actual | Closure | The closure to run. |
$expected | mixed | A string indicating what the error text is expected to be or a exception instance. |
$code | integer | The expected `Exception` code if `$expected` is a string. |
return | boolean |
public static array $_description | ||
return | array |