Re: Unable to run unit tests because PHPUnit_MAIN_METHOD constant is already defined
| From: | Christian Weiske | Date: | Fri, 20 Mar 2009 09:18:22 +0000 |
| Subject: | Re: Unable to run unit tests because PHPUnit_MAIN_METHOD constant is already defined | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51640@lists.php.net to get a copy of this message | ||
Hello Luca,
> > > I'm trying to rewrite and execute some old tests wrote for the
> > > Net_OpenSSH proposal package
> > > but now I'm unable to run the tests because the PHPUnit_MAIN_METHOD
> > > constant
> > >
> > > is already defined with the "PHPUnit_TextUI_Command::main" value so
> > > the AllTests::main() in no executed.
> > Who defines it?
> >
> It seems the phpunit executable ...
> http://www.phpunit.de/browser/phpunit/tags/3.3.15/phpunit.php
You are using phpunit the wrong way.
Either:
$ php your-test-script.php
or
$ phpunit Class_Name
--
Regards/Mit freundlichen Grüßen
Christian Weiske