Modify

Ticket #185 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

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

comment:1 Changed 4 years ago by hans

  • Status changed from new to closed
  • Resolution set to fixed

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

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.