Testing the database layer is a fundamental step during application development. It allows us to ensure that all data operations behave properly, without data loss or corruption.
In this article, we are going to describe a simple way to test the database layer of our applications, using PHPUnit database classes, Zend Framework extensions and some custom reusable code to facilitate the process for all the domain models.