Grouping Tests
Because our BookRepository will be connected to the database I'd consider any testing of it to be an integration test.
As I explain in the full Testing PHP course, you can consider an integration test to be one where you will be required to integrate with another technology or another API which resides outside of the bounds of your own application.
Pest makes it really easy to add individual tests to a group so let's add our BookRepositoryTest to a group called integration and then we can run just the tests in that group in isolation as well as also being able to exclude the tests in that group from being run.
Branch: https://github.com/GaryClarke/pest-tdd/tree/34-book-repository-test
0 comments