trait Has (View source)
| Has | count(string|int $key, int|null $length = null)
Assert that the prop is of the expected size. | |
| Has | has(string|int $key, int|Closure|null $length = null, Closure|null $callback = null)
Ensure that the given prop exists. | |
| Has | hasAll(array|string $key)
Assert that all of the given props exist. | |
| Has | hasAny(array|string $key)
Assert that at least one of the given props exists. | |
| Has | missingAll(array|string $key)
Assert that none of the given props exist. | |
| Has | missing(string $key)
Assert that the given prop does not exist. | |
| string | dotPath(string $key = '')
Compose the absolute "dot" path to the given key. | |
| void | interactsWith(string $key)
Marks the property as interacted. | |
| mixed | prop(string|null $key = null)
Retrieve a prop within the current scope using "dot" notation. | |
| $this | scope(string $key, Closure $callback)
Instantiate a new "scope" at the path of the given key. | |
| $this | etc()
Disables the interaction check. | |
| $this | first(Closure $callback)
Instantiate a new "scope" on the first element. |
Assert that the prop is of the expected size.
Ensure that the given prop exists.
Assert that all of the given props exist.
Assert that at least one of the given props exists.
Assert that none of the given props exist.
Assert that the given prop does not exist.
Compose the absolute "dot" path to the given key.
Marks the property as interacted.
Retrieve a prop within the current scope using "dot" notation.
Instantiate a new "scope" at the path of the given key.
Disables the interaction check.
Instantiate a new "scope" on the first element.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Testing/Fluent/Concerns/Has.html