Re: PHPUnit2

From: 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...
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>...
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?
I have some code from PHPUnit (not 2) if you're interested. -- paperCrane <Justin Patrin>
Of course...PHPUnit2 is not even released yet... I sent you a simple example off list. -- paperCrane <Justin Patrin>

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