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 21
Matching
where(string $key, mixed $expected)
Assert that the property matches the expected value.
at line 57
Matching
whereNot(string $key, mixed $expected)
Assert that the property does not match the expected value.
at line 98
Matching
whereNull(string $key)
Assert that the property is null.
at line 120
Matching
whereNotNull(string $key)
Assert that the property is not null.
at line 142
Matching
whereAll(array $bindings)
Assert that all properties match their expected values.
at line 156
Matching
whereType(string $key, array|string $expected)
Assert that the property is of the expected type.
at line 180
Matching
whereAllType(array $bindings)
Assert that all properties are of their expected types.
at line 194
Matching
whereContains(string $key, mixed $expected)
Assert that the property contains the expected values.
at line 235
protected void
ensureSorted(mixed $value)
Ensure that all properties are sorted the same way, recursively.
at line 251
abstract protected string
dotPath(string $key = '')
Compose the absolute "dot" path to the given key.
at line 258
abstract Matching
has(string|int $key, int|Closure|null $value = null, Closure|null $scope = null)
Ensure that the given prop exists.
at line 263
abstract protected mixed
prop(string|null $key = null)
Retrieve a prop within the current scope using "dot" notation.