PHPUnit A developer's perspective By Tushar Joshi, Nagpur Presented at: 19 June 2010, 4pm, PHPMeet Nagpur #ngpphpmeet
Assumptions for this presentation No earlier knowledge of PHPUnit
PHP Developers
Knowledge of Object Oriented Programming
Things covered Conceptual introduction to PHPUnit
Discussion about need of unit testing
Case for PHPUnit
Demonstration of working of PHPUnit (not part of slides but done side by side while presenting)
Things not covered History of PHPUnit, history of unit testing frameworks
Installation of PHP, PHPUnit, PEAR, Xdebug, NetBeans IDE
Configuration of the development environment
Detailed usage of PHPUnit, all cases which can be tested
Are there any bugs? Developer says: I have checked the code many times
There cannot be any bugs now
Manager believes the first time Courtesy: Sam Fraser - Smith
Client sends issues Developer says: Oops, I don't know how I slipped that one
Never thought that value will be passed to this function
Next time manager will be skeptical to believe easily Courtesy: cheerfulmonk
Introducing PHPUnit Tool to unit test your PHP code
To re-test the code after any modifications
Tool to ensure your code always work for given inputs Can be used for Object Oriented PHP code
Is PHPUnit Easy? You cannot use the tool unless you know it

PHPUnit from a developer's perspective