PHPUnit?
PHPUnit is a test suite framework.
Pretty much the standard in PHP. Used by:
Zend Framework
Symfony
ezComponents and many many more.
Fully featured (more later).
Improvements over
SimpleTest
Better command line tools.
Better coverage reports.
Better selection of assertions.
Better mock objects.
Better tool chain support.
Pretty much all win.
Better failures
1 1) MyTest::makeSureStuffIsTheSame
2 Failed asserting that two strings are equal.
3 --- Expected
4 +++ Actual
5 @@ @@
6 This is some
7 -text
8 -on multiple lines
9 +words
10 +on
11 +a second line
Code coverage
How much of your code gets run in your tests.
Requires xDebug.
Comes in several formats:
Clover format.
Comprehensive HTML report.
Single test reports.
Clover reports
Clover reports. XML le that works well with
Jenkins/Hudson.
Console/cake testsuite
--coverage-clover clover.xml
app AllTests
Complete HTML
report
Full detailed report for your entire project.
Slower to generate, but more complete.
Console/cake testsuite
--coverage-html ./webroot/coverage
app AllTests
Runners
Command line runner.
Web runner.
Some con gurations have troubles running
sessions in cli. But its a con g option.
Main difference is how you use them.