Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Trivial
-
Resolution: Unresolved
-
Affects Version/s: 1.10.2
-
Fix Version/s: None
-
Component/s: Zend_Test_PHPUnit
-
Labels:
Description
A simple
php -r "require_once 'PHPUnit/Framework/TestCase.php';"
produces the error
Fatal error: Cannot redeclare class PHPUnit_Framework_TestCase in C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php on line 116
The PHPUnit documentation says to include/require PHPUnit/Framework.php to write own derived test cases.
My application needs to load the Zend_Test_PHPUnit_ControllerTestCase class which uses the above require_once statement and therefore produced the error message about class redeclaration. When I replace the statement, my application and my very own tests run fine.
Patch attached