Starting a test suite can feel harder than maintaining one: what should you test first, and how much is enough? Laravel Testing 101 approaches those questions through a working CRUD application, showing how tests can help catch changes that disrupt behavior people already rely on.
Rather than presenting testing ideas one at a time in isolation, Youghourta Benali follows a small application as its tests take shape. The examples center on Laravel controllers and the everyday actions of guests and registered users.
Follow a Laravel CRUD app as its tests grow
The book’s running example lets users browse articles and profiles, then sign up to create, edit, and delete their own articles. That gives the testing walkthrough a clear practical thread: each test relates to an action someone can take—or a restriction the application needs to enforce.
Cover public pages, user actions, and access rules
- Check what guests can view, including article listings, individual articles, and profiles.
- Test sign-up and login pages, as well as the redirect guests encounter when they try to write an article.
- Exercise signed-in users’ ability to create, update, and delete their own articles.
- Test limits on editing or deleting another user’s articles and on submitting content that fails validation.
Together, these cases show how tests can cover both the expected path through an application and the boundaries that protect it.
Build a maintainable testing setup
Beyond individual test cases, Benali discusses checking that PHPUnit is working, refactoring repeated test setup into a base test class, and using a dedicated database for tests. The final sections turn to continuous integration, including a setup with Bitbucket Pipelines.
A practical starting point for Laravel testing
This ebook may suit Laravel developers who are beginning to add tests to an existing CRUD project or who want to see common user and access-control scenarios worked through in context. Its examples reflect the author’s own approach to testing; the book explicitly presents that approach as one possible way to work, not as a universal prescription. 📚
Original price was: $35.00.$17.50Current price is: $17.50.

There are no reviews yet.