Unable to run unit tests because PHPUnit_MAIN_METHOD constant is already defined

From: Date: Thu, 19 Mar 2009 16:59:21 +0000
Subject: Unable to run unit tests because PHPUnit_MAIN_METHOD constant is already defined
Groups: php.pear.dev php.pear.qa 
Request: Send a blank email to pear-dev+get-51637@lists.php.net to get a copy of this message
Hi all, 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. Have you encountered the same issue? Below you may find code snippet and my environment details. Thanks and regards, Luca OS: Mac OS X 10.5 php: 5.2.6 PEAR: 1.7.2 PHPUnit: 3.3.15 AllTests.php ----------------- if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'AllTests::main'); } require_once 'PHPUnit/Framework/TestSuite.php'; require_once 'PHPUnit/TextUI/TestRunner.php'; class AllTests { .... .... } if (PHPUnit_MAIN_METHOD == 'AllTests::main') { AllTests::main(); } **

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