Ticket #185 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

PHPUnit_MAIN_METHOD defined more than once

Reported by: Oz Solomon Assigned to: hans
Priority: trivial Milestone: 2.3.1
Component: phing-core Version: 2.3.0
Keywords: Cc:

Description

If there are multiple PHPUnit tasks, then the code will attempt to define the constant PHPUnit_MAIN_METHOD more than once. This sometimes causes problems as redefinition of constants is not allowed.

The easiest fix is to change PHPUnitTask.cpp line 108 from:

define('PHPUnit_MAIN_METHOD', 'PHPUnitTask::undefined');

to:

@define('PHPUnit_MAIN_METHOD', 'PHPUnitTask::undefined');

or:

if (!defined('PHPUnit_MAIN_METHOD')) define('PHPUnit_MAIN_METHOD', 'PHPUnitTask::undefined');

Attachments

Change History

11/08/07 20:47:24 changed by hans

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

Thank you. Fixed in r305 and r306 (trunk).


Add/Change #185 (PHPUnit_MAIN_METHOD defined more than once)




Action