Re: Re: Heads up - go-pear refactor

From: Date: Mon, 04 Apr 2005 05:47:44 +0000
Subject: Re: Re: Heads up - go-pear refactor
References: 1 2 3 4  Groups: php.pear.dev php.pear.core 
Request: Send a blank email to pear-dev+get-37067@lists.php.net to get a copy of this message
Jon Parise wrote:
On Mon, Apr 04, 2005 at 01:33:25AM -0400, Greg Beaver wrote:
Then I will write unit tests for go-pear that will allow us to at least verify that basic functionality is working.
       
Wouldn't it make more sense to write some unit tests first in order to verify the iterative progress (and success) of the refactoring?
     
Sure, if you can properly simulate: 1) cscript (windows) 2) download from pear.php.net 3) reading input from php://stdin
I know how to do none of these days. I actually have no experience writing unit tests for a PHP-based environment.
then it would be possible. Even if the second two are possible, the first can only be done with a bit more abstraction. go-pear is really not sandboxable yet.
I assumed such testing techniques had already been developed for testing the PEAR tool itself. I know understand how that was accomplished.
Unless you know something I don't - and then, I would love some assistance on this point.
I hope you didn't take my commentary as criticism. It wasn't intended as such. I think you're taking the best approach.
No, actually, I have heard rumors that apachetest can do some amazing things with programming, you know, unclog toilets and save kittens from trees and the like, and was just wondering if you knew stuff that I didn't :) My primary experience is with PHPUnit 1, which has no support for sandboxing built in, and my customizations to .phpt, which required me to write a simulator for both http download and xml-rpc functions. I would use similar techniques for go-pear, but they would have to be custom-designed for this project. Btw, my stepping through with ZDE in windows works flawlessly, I am going to try it in linux later, maybe tomorrow. Greg

« previous php.pear.dev (#37067) next »