Re: PHPUnit2
| From: | Jeremiah J. Jacks | Date: | Fri, 26 Mar 2004 22:11:27 +0000 |
| Subject: | Re: PHPUnit2 | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26812@lists.php.net to get a copy of this message | ||
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>...
> 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?