GenericAssertionsTrait
trait GenericAssertionsTrait
Class ExtraAssertionsTrait
Methods
No description
Assert that two array-trees are exactly equal.
Assert that two numbers are approximately equal, give or take some $tolerance.
Assert attributes are equal.
No description
No description
Assert the 2 arrays have the same values.
Details
at line 21
assertType(string $expected, $actual, string $message = '')
at line 37
assertTreeEquals(array $expected, array $actual)
Assert that two array-trees are exactly equal.
The ordering of keys do not affect the outcome (within either the roots or in any child elements).
Error messages will reveal a readable -path-, regardless of how many levels of nesting are present.
at line 59
assertApproxEquals(int|float $expected, int|float $actual, int|float $tolerance, string $message = NULL)
Assert that two numbers are approximately equal, give or take some $tolerance.
at line 76
assertAttributesEquals(array $expectedValues, array $actualValues, string $message = NULL)
Assert attributes are equal.
at line 91
assertArrayKeyExists(string|int $key, array $list)
at line 100
assertArrayValueNotNull(string|int $key, array $list)
at line 117
assertArrayValuesEqual(array $array1, array $array2)
Assert the 2 arrays have the same values.
The order of arrays, and keys of the arrays, do not affect the outcome.