Modify ↓
Ticket #185 (closed defect: fixed)
PHPUnit_MAIN_METHOD defined more than once
| Reported by: | Oz Solomon | Owned by: | hans |
|---|---|---|---|
| Priority: | low | 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
Note: See
TracTickets for help on using
tickets.

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