Matching
trait Matching
Methods
Assert that the property does not match the expected value.
Assert that the property is not null.
Assert that the property is of the expected type.
Assert that all properties are of their expected types.
Assert that the property contains the expected values.
Ensure that all properties are sorted the same way, recursively.
Compose the absolute "dot" path to the given key.
Retrieve a prop within the current scope using "dot" notation.
Details
at line 19
Matching
where(string $key, mixed $expected)
Assert that the property matches the expected value.
at line 53
Matching
whereNot(string $key, mixed $expected)
Assert that the property does not match the expected value.
at line 92
Matching
whereNull(string $key)
Assert that the property is null.
at line 112
Matching
whereNotNull(string $key)
Assert that the property is not null.
at line 132
Matching
whereAll(array $bindings)
Assert that all properties match their expected values.
at line 144
Matching
whereType(string $key, array|string $expected)
Assert that the property is of the expected type.
at line 166
Matching
whereAllType(array $bindings)
Assert that all properties are of their expected types.
at line 178
Matching
whereContains(string $key, mixed $expected)
Assert that the property contains the expected values.
at line 219
protected void
ensureSorted(mixed $value)
Ensure that all properties are sorted the same way, recursively.
at line 235
abstract protected string
dotPath(string $key = '')
Compose the absolute "dot" path to the given key.
at line 240
abstract Matching
has(string|int $key, int|Closure|null $value = null, Closure|null $scope = null)
Ensure that the given prop exists.
at line 245
abstract protected mixed
prop(string|null $key = null)
Retrieve a prop within the current scope using "dot" notation.