Download the PHP package ralphjsmit/pest-plugin-livewire without Composer
On this page you can find all versions of the php package ralphjsmit/pest-plugin-livewire. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package pest-plugin-livewire
Test your Livewire forms with Pest
This package provides a convenient way to test your Livewire forms and speed up your workflow. It adds helpers that make repetitive tasks faster, like testing whether properties are required or not.
[!IMPORTANT]
This package works only with Livewire V2 and up to Laravel 10. Therefore, it will not be updated to support Livewire V3 and/or Laravel 11 or higher. The repository will be archived.
Contents
- Expectations
- expect(...)->toHaveRequiredProperties()
- expect(...)->toNotHaveRequiredProperties()
- Functions
- assertRequiredProperties(...)
- assertNotRequiredProperties(...)
- validInput(...)
Expectations
expect(...)->toHaveRequiredProperties()
Test whether Livewire properties are required. Consider the following dummy Livewire component:
NB.: Using
->not
to negate the test is currently not yet supported.
expect(...)->toNotHaveRequiredProperties()
Test whether Livewire properties aren't required. Let's continue the example from above with a test for the properties that are not required:
NB.: Using
->not
to negate the test is currently not yet supported.
Functions
assertRequiredProperties()
Use this function to test whether Livewire properties are required. Consider using an expect(...)
call if you want to chain multiple expectations:
assertNotRequiredProperties()
Use this function to test whether Livewire properties aren't required. Consider using an expect(...)
call if you want to chain multiple expectations:
validInput()
Use this function to get a ValidInput
object (Laravel Collection). It's needed for using the above functions.
General
🐞 If you spot a bug, please submit a detailed issue and I'll try to fix it as soon as possible.
🔐 If you discover a vulnerability, please review our security policy.
🙌 If you want to contribute, please submit a pull request. All PRs will be fully credited. If you're unsure whether I'd accept your idea, feel free to contact me!
🙋♂️ Ralph J. Smit
All versions of pest-plugin-livewire with dependencies
illuminate/support Version ^8.76|^9.0|^10.0
livewire/livewire Version ^2.8
pestphp/pest Version ^1.17|^2.0
pestphp/pest-plugin Version ^1.0|^2.0