Ticket #80 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Task phpunit doesn't define PHPUnit_MAIN_METHOD

Reported by: julien@duponchelle.info Assigned to: mrook
Priority: minor Milestone:
Component: phing-tasks-phpunit Version: 2.3.0beta1
Keywords: Cc:

Description

When we use phpunit --skeleton we have this code:

if (!defined("PHPUnit_MAIN_METHOD")) {
	define("PHPUnit_MAIN_METHOD", "USVN_Auth_Adapter_DbTest::main");
}

require_once "PHPUnit/Framework/TestCase.php";
require_once "PHPUnit/Framework/TestSuite.php";

//TESTCLASS

// Call USVN_Auth_Adapter_DbTest::main() if this source file is executed directly.
if (PHPUnit_MAIN_METHOD == "USVN_Auth_Adapter_DbTest::main") {
	USVN_Auth_Adapter_DbTest::main();
}

But phing doesn't set PHPUnit_MAIN_METHOD and my test start twice.

Attachments

Change History

03/14/07 20:27:16 changed by mrook

  • status changed from new to closed.
  • resolution set to fixed.

The PHPUnit_MAIN_METHOD constant is now defined, fixed in r178.


Add/Change #80 (Task phpunit doesn't define PHPUnit_MAIN_METHOD)




Action