Testing code manually sucks. Most of the time you have to create the required state of data in a database manually, perform the required actions under the required conditions in a browser, and then re-create the state and conditions again and again until you get the desired results. I bet you've done this in the past, I sure did.

Automated tests take care of preparing the data and the conditions and execute all the actions. Writing tests is also not the most fun activity in the world. Nonetheless, having tests in place saves time and assures a much better product quality, keeping you away from problems in the future.

Testing of PHP code is usually done with the use of PHPUnit, which is a testing framework. Laravel extends the default PHPUnit functionality by adding useful traits and methods to make testing Laravel apps a walk in the park. We won't discuss PHPUnit outside the context of Laravel.