Re: PHPUnit2
| From: | Justin Patrin | Date: | Fri, 26 Mar 2004 22:27:50 +0000 |
| Subject: | Re: PHPUnit2 | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26813@lists.php.net to get a copy of this message | ||
Jeremiah J. Jacks wrote:
Yeah, 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 to see the tests run from my browser in the external preview... Does phpunit2 allow you to get html output, if so, what is the code to do 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 the code... I want to do simple things like run individual tests manually, execute suites manually, etc. can someone post some examples of stuff... I went into PHPUnit/Tests and tried to make sense of the code in there to make my own tests, 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?