Mock class and unit tests allow us to make sure we are hitting the API endpoints we think we should, but are those the right endpoints really? Do they do what we think they do? What if we made the same typos in both Verify and in the unit tests? And what if they change?
Create a suite of full integration tests, similar to the former "unit" tests. Don't need to go too deep; we don't need to test PHPUnit's functionality, just test that when we run:
Mock class and unit tests allow us to make sure we are hitting the API endpoints we think we should, but are those the right endpoints really? Do they do what we think they do? What if we made the same typos in both
Verify
and in the unit tests? And what if they change?Create a suite of full integration tests, similar to the former "unit" tests. Don't need to go too deep; we don't need to test PHPUnit's functionality, just test that when we run:
the test really does pass.