We author a comprehensive PHP framework and would like modular unit tests to test each class and function. We have an existing set of unit tests that were created, but they not created in modular manner. By modular, I mean that each function/property should have a unit test function, rather than just one function in the unit test that tests all properties linearly. The reason the tests need to be done this way is that the framework is hierarchical, thus if done properly, most of the work need only be done for the base classes, and the inherited sub-classes could inherit from the base and need only implement their specific functions.
So ideally, say parent class 1 has 10 functions, and sub-class 2 has 5 functions. Parent class should have 10 unit test functions, each corresponding to a class function, then the sub-class's unit test would inherit from the parent unit test class, and you would implement the additional 5 specific to the sub-class. Then in your actual test function that triggers the others, it can do a parent:: call to test it's inherited functions/properties, followed by calls to it's specific tests.
Tests should work from both the command line and browser, however, if browser is too difficult, command line will do, there are some nice GUIs around unit test output that we can recommend, such as [login to view URL]
So, clean and modular tests. We have an existing set of tests from a previous development effort, but they weren't modular.
There are approximately 90 classes, and 800 functions.
Code must be commented, and documented in a reasonable manner. The end result should be something you would be proud to demonstrate to a future employer, or colleague. The code will be made public and attributed to you.
## Deliverables
PHPUnit