Time to Automate Tests Again

Standard stuff for the test class

As you may already know, we can use PHPUnit’s setUp() method when we need to do something before running each test of the class. In this test class and all of the following ones, we need to log in the user in each test because the API endpoints are auth protected.

We have also made the user object a class property, so we can use it to create new restaurants during various tests.

Get hands-on with 1400+ tech skills courses.