PHPUnit – Database Testing

In this article, we will see how to test database operations using PHPUnit. In this example, we will create a class called GuestBook, which will have a function called addGuest(). The addGuest() will add a row to database table. Using PHPUnit, we will test, whether the addGuest() is adding new row to database table. 1. […]