[PHP] Poll: phpt or phpunit and why?
HI, When writing tests, do you use phpt or phpunit? (or another one?) Why do you use that one? Let's share the idea. I like both, but when I write simple tests, I prefer to use phpt because it's less code and easy to write. I use phpunit for tests of complex classes. I can do that with phpt, but to me phptunit is more easy to understand what the test is doing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Poll: phpt or phpunit and why?
On Feb 6, 2008 9:38 AM, js [EMAIL PROTECTED] wrote: HI, When writing tests, do you use phpt or phpunit? (or another one?) Why do you use that one? Let's share the idea. I like both, but when I write simple tests, I prefer to use phpt ive just now learned of phpt. this would explain some of the tests i was looking at in spl; thanks for the info! because it's less code and easy to write. really, phpunit tests are pretty small; i dont think it could be *that* much difference. phpunit has some other features you may have overlooked, such as code coverage analysis. it will also generate test stubs as well, via a cli argument phpunit --skeleton however, with phpunit, im not sure exactly how to test procedural files or even sets of global functions. it is really designed for testing only classes, afaik.. -nathan
Re: [PHP] Poll: phpt or phpunit and why?
in a conversation on #gentoo-php (irc), the following distinction was drawn, back on the phpt; just curious, how do you see it compared to something like phpunit ? comparable, or different.. different... phpt is probably really mostly intended for testing php and their extensions phpunit rather for testing code written in php -nathan
Re: [PHP] Poll: phpt or phpunit and why?
On Feb 6, 2008 1:32 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: in a conversation on #gentoo-php (irc), the following distinction was drawn, back on the phpt; just curious, how do you see it compared to something like phpunit ? comparable, or different.. different... phpt is probably really mostly intended for testing php and their extensions phpunit rather for testing code written in php -nathan This might be of interest: http://talks.somabo.de/200703_montreal_need_for_testing.pdf You can also see his other talks here: http://talks.somabo.de/ Right now I use Simpletest because I'm heavily invested in it. PHPUnit is looking better every day though... :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php