Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
Pest
Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
You can get the full example from GitHub if you want to check it out.
There are many tools you can use to prove the correct working of this method. The most popular one (by far!) is phpUnit.
Pest: a testing framework designed following Laravel coding standards
The first thing you should do to add it to your project is install the tool. The best way to go about it is to add it as a dependency of the project. Assuming that your project is built using composer, all you need to do is issue a composer require --dev phpunit/phpunit, which will produce a new file inside your vendor/bin directory: phpunit.
There are many tools you can use for this purpose, but one I particularly like is CodeCeption. What I like most about it is that it's a unified tool that can be used to perform several types of tests, acceptance being one of them.