stop! .. time for unit tests

Lukas Kahwe Smith <[email protected]> Tue, 23 Aug 2005 12:10:29 +0200
Newsgroups gmane.comp.php.pear.liveuser
Message-ID <[email protected]>
Hi,

ok this last bug did it for me ..
we should stop any feature enhancement efforts until we get the unit 
testing stuff worked out.

first we have to pick a tool kit.

1) phpt

AFAIK it currently can only run tests on the shell, which kills testing 
the session handling. though there is supposedly a patch to allow 
testing inside a SAPI as well.

Aside from this its fairly simple and requires little knowledge beyond 
PHP itself once we have a few examples done. Also since its just PHP 
code with a bunch of print statements is very easy to integrate any user 
provided bug reproduce scripts.

2) PHPUnit(2)

I am using PHPUnit for MDB2 based on the initial work  by Paul Cooper. 
It seems to work alright.

3) SimpleTest

I tried it out a while back and I even did some initial unit testing for 
LiveUser once (http://www.backendmedia.com/LiveUser/liveuser_test.zip). 
It also seems to work alright. I just remember that I wanted to do 
something simple and Marcus the lead developer insisted that I jump 
through 3 hoops to get it done.

regards,
Lukas