Re: PHPUnit2
| From: | Justin Patrin | Date: | Fri, 26 Mar 2004 22:45:27 +0000 |
| Subject: | Re: PHPUnit2 | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26815@lists.php.net to get a copy of this message | ||
Jeremiah J. Jacks wrote:
Well, I kinda want to use the php5 features in PHPUnit2 and the older PHPUnit does not seem to include them. In fact, it seems alot different. The whole OM was renamed and such, but I will take a look at your code if you wouldn't mind zip'ng it over to me... thx "Justin Patrin" <papercrane@reversefold.com> wrote in message news:20040326222737.92714.qmail@pb1.pair.com...Of course...PHPUnit2 is not even released yet... I sent you a simple example off list. -- paperCrane <Justin Patrin>Jeremiah J. Jacks wrote:seeYeah, I went in there and saw that it was trying to grab stuff from the command line to concat for an include. I am using eclipse and want todothe tests run from my browser in the external preview... Does phpunit2 allow you to get html output, if so, what is the code tocode...this? Also, is there ANY documentation with examples on this library? I really want to use it, but can't find any examples anywhere and I don't really have time to try and figure things out by looking through theintoI want to do simple things like run individual tests manually, execute suites manually, etc. can someone post some examples of stuff... I wentownPHPUnit/Tests and tried to make sense of the code in there to make mytests, but does anyone have any easier code...? Oh, Thanks Hans! "Hans Lellelid" <hans@appliedsec.com> wrote in message news:<4064A43C.7070706@appliedsec.com>...I have some code from PHPUnit (not 2) if you're interested. -- paperCrane <Justin Patrin>Try adding this to the top of your script:define('PHPUnit_MAIN_METHOD', "NO! PHPUnit,don't autorun anything.");That worked for me :) Apparently PHPUnit is built now to be run fromthecommandline -- but you have to design a class w/ an entry point for yourentire test suite. If you want to use it from within a script you haveto override this behavior (at least, I did).HansJeremiah J. Jacks wrote:I cannot seem to get PHPUnit2 working correctly... Something iswrong with TestRunner.php or I might not have something configuredproperly? I can't seem to find any documentation on how to getPHPUnit2 working...All I have is the below include in my test and nothing else:require_once 'PHPUnit/TextUI/TestRunner.php';and I am getting the following error:Warning: PHPUnit_Runner_StandardTestSuiteLoader::load(.php)[function.load]: failed to open stream: No such file or directory inC:\php5\pear\PHPUnit\Runner\StandardTestSuiteLoader.php on line 35Warning: PHPUnit_Runner_StandardTestSuiteLoader::load()[function.include]: Failed opening '.php' for inclusion(include_path='.;C:\php5\pear') inC:\php5\pear\PHPUnit\Runner\StandardTestSuiteLoader.php on line 35Class does not existAny ideas?