PHP 7.3+ to work.
Check that you have a
phpunit.xml file at the root of your project. Otherwise, download this one.
Make sure your existing
composer.json file contains the following options:
"minimum-stability": "dev", "prefer-stable": true,
composer require phpunit/phpunit:"^9.3.10" --dev --update-with-dependencies
If you are using Laravel, make sure your Collision dependency is set to
composer require nunomaduro/collision:"^5.0" --dev --update-with-dependencies
Now you can require Pest:
composer require pestphp/pest --dev
Now, it's time to setup your Pest test suite.
pest-plugin-laraveland run the
composer require pestphp/pest-plugin-laravel --dev && php artisan pest:install
Finally, you can run Pest directly from the command line:
On the next section, we are going to learn how to write tests with Pest: Writing Tests →