Class Assert
Assert is a non-chainable, object oriented interface on top of a Leo Assertion.
- Peridot\Leo\Interfaces\Assert uses Peridot\Leo\Interfaces\Assert\TypeAssertTrait, Peridot\Leo\Interfaces\Assert\ObjectAssertTrait, Peridot\Leo\Interfaces\Assert\CollectionAssertTrait
public
public
public
public
public
#
doesNotThrow( callable $fn, mixed $exceptionType, string $exceptionMessage = "", string $message = "" )
Performs a negated throw assertion.
Performs a negated throw assertion.
Parameters
- $fn
- $exceptionType
- $exceptionMessage
- $message
public
public
public
#
strictEqual( mixed $actual, mixed $expected, string $message = "" )
Perform a strict equality assertion.
Perform a strict equality assertion.
Parameters
- $actual
- $expected
- $message
public
#
notStrictEqual( mixed $actual, mixed $expected, string $message = "" )
Perform a negated strict equality assertion.
Perform a negated strict equality assertion.
Parameters
- $actual
- $expected
- $message
public
public
public
public
isArray(),
isBoolean(),
isCallable(),
isDouble(),
isFalse(),
isInteger(),
isNotArray(),
isNotBoolean(),
isNotCallable(),
isNotDouble(),
isNotInteger(),
isNotNull(),
isNotNumeric(),
isNotObject(),
isNotResource(),
isNotString(),
isNull(),
isNumeric(),
isObject(),
isResource(),
isString(),
isTrue(),
notTypeOf(),
typeOf()
deepProperty(),
deepPropertyNotVal(),
deepPropertyVal(),
isInstanceOf(),
notDeepProperty(),
notInstanceOf(),
notProperty(),
property(),
propertyNotVal(),
propertyVal()
public
mixed
#
instanceOf( string $expected, string $message = "" )
Perform an instanceof assertion.
Perform an instanceof assertion.
Parameters
- $expected
- $message
- $message
Returns
mixed
public
mixed
public static
array
$operators
An array of operators mapping to assertions.
An array of operators mapping to assertions.
#
[
'==' => 'loosely->equal',
'===' => 'equal',
'>' => 'above',
'>=' => 'least',
'<' => 'below',
'<=' => 'most',
'!=' => 'not->loosely->equal',
'!==' => 'not->equal'
]