Working With PHPUnit
Posted on April 15, 2006
Filed Under /dev/null/ | 82 views |
Some things about working with PHPUnit I’ve found that are not readily apparent from the documentation or simply make it easier to work with.
- name your test class php file the same as the class name inside the file, ie: for class
UserManagerTestname the fileUserManagerTest.php - when printing out to screen, do include
\nat the end of your print statements, ie:
print “Result: ” . sizeof( $userArray ) . “\n”;
- if you’ve installed Marc Liyanage’s version of PHP 5 for OS X
phpunitwill be installed here after you’ve run PEAR:/usr/local/php5/bin/phpunit. You might want to add that to your shell’s $PATH value
Comments
Leave a Reply