In this episode we continue to use Test Driven Development (TDD) to drive out the implementation the simple HTTP REST(ish) API microservice in PHP.
We add handling when a book is not available to the endpoint GET to retrieve a book by its ISBN.
Starting with an End to End Test write using PHP Unit and Guzzle HTTP Client for PHP to design out how consumers of the API will interact with the endpoint.
We then add an Integration test to ensure our code uses Doctrine PHP ORM to interact with the Postgres database to get the book data.
The code produced during this episode can be found on GitHub
During this video we use: