PHP Unit Testing Frameworks
Sunday, 14th August 2011
Having used nUnit and MSTest for C#, I know that I have been spoiled when writing unit tests in .NET. When I came to write some PHP in a test-driven manner, I looked for a similar framework in PHP.
The two big players in PHP are SimpleTest and PHPUnit - but there are many others too. I wanted something that was easy to install and use, preferably written in PHP and that allowed me to express my tests as I normally do. So I read through the installation instructions, viewed how tests are expressed and even had a go at using a few of them.
After playing around with some of these frameworks I stopped what I was doing and rolled my own. I can express my tests as I want, with minimal peripheral code and have them executed with a single line of code.
I'm just using the test framework for my own personal use currently and this will hopefully discover the features that are really needed for a lightweight PHP unit testing framework for use in the real world.