Before we start writing some PHPUnit test scripts, let's go ahead and create a very simple application consisting of merely a few files. This will allow us to focus on the essence of writing a test later on.
Let's assume that we are making a part of the web shopping functionality, thus dealing with product and category entities for a start. The first class we address is the Product ...