fidum / laravel-blueprint-pestphp-addon
Generate pestphp tests from your laravel blueprint!
Fund package maintenance!
dmason30
Installs: 11 954
Dependents: 1
Suggesters: 0
Security: 0
Stars: 36
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: ^8.0
- jasonmccreary/laravel-test-assertions: ^2.2
- laravel-shift/blueprint: ^2.6.1
Requires (Dev)
- mockery/mockery: ^1.5.1
- orchestra/testbench: ^8.0.4
- pestphp/pest: ^1.22.4
- phpunit/phpunit: ^9.6.4
- spatie/pest-plugin-snapshots: ^1.1
- vimeo/psalm: ^4.30
README
Blueprint as of v2.8.0 now has first party support for generating PestPHP tests. So this package is now read only and you should update blueprint to use their new test generation.
Blueprint Pest Addon
📣 Shoutout to Jason McCreary whose Blueprint and Assertions packages lay the groundwork for this addon. 🙌
Installing this addon will allow you to generate Pest HTTP tests instead of the standard PHPUnit HTTP tests with the php artisan blueprint:build
command.
Installation
You can install this package and Blueprint via composer:
composer require --dev laravel-shift/blueprint fidum/laravel-blueprint-pestphp-addon
Usage
-
Install Pest by following their installation instructions.
-
Refer to Blueprint's Basic Usage to get started. Afterwards you can run the
blueprint:build
command to generate Pest HTTP tests automatically for your controllers. -
Read Pest's Writing Tests to help understand the generated test output.
Examples
We use fixtures in our tests to make sure this package generates the files correctly. Feel free to browse them at the link below as examples of what output you should expect.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.