Re: PHPUnit2
| From: | Hans Lellelid | Date: | Fri, 26 Mar 2004 21:44:28 +0000 |
| Subject: | Re: PHPUnit2 | ||
| References: | 1 | Groups: | php.pear.dev php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26811@lists.php.net to get a copy of this message | ||
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 from the commandline -- but you have to design a class w/ an entry point for your entire test suite. If you want to use it from within a script you have to override this behavior (at least, I did).
Hans
Jeremiah J. Jacks wrote:
I cannot seem to get PHPUnit2 working correctly... Something is wrong with TestRunner.php or I might not have something configured properly? I can't seem to find any documentation on how to get PHPUnit2 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 in C:\php5\pear\PHPUnit\Runner\StandardTestSuiteLoader.php on line 35 Warning: PHPUnit_Runner_StandardTestSuiteLoader::load() [function.include]: Failed opening '.php' for inclusion (include_path='.;C:\php5\pear') in C:\php5\pear\PHPUnit\Runner\StandardTestSuiteLoader.php on line 35 Class does not exist Any ideas?