fidum/laravel-blueprint-pestphp-addon

This package is abandoned and no longer maintained. The author suggests using the laravel-shift/blueprint package instead.

Generate pestphp tests from your laravel blueprint!

2.3.0 2023-02-28 22:04 UTC

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

Latest Version on Packagist GitHub Workflow Status (with branch) Codecov Twitter Follow

📣 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.

Preview

Installation

You can install this package and Blueprint via composer:

composer require --dev laravel-shift/blueprint fidum/laravel-blueprint-pestphp-addon

Usage

  1. Install Pest by following their installation instructions.

  2. 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.

  3. 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.

Click here to view the files

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.