ZF-10708: Cannot redeclare class
Description
Unit tests of ZF2 fail with the following information:
E_COMPILE_ERROR: Cannot redeclare class ZendTest\File\Transfer\Adapter\HttpTest
#0 /home/rtuin/projects/github/zf2/tests/Zend/File/Transfer/Adapter/HTTPTest.php(283)
PHP Fatal error: Cannot redeclare class ZendTest\File\Transfer\Adapter\HttpTest in /home/rtuin/projects/github/zf2/tests/Zend/File/Transfer/Adapter/HTTPTest.php on line 283
Comments
Posted by Richard Tuin (richardtuin) on 2010-11-18T11:58:12.000+0000
It turns out there are 2 files containing the same class: HTTPTest.php and HttpTest.php
Working on a fix now.
Posted by Matthew Weier O'Phinney (matthew) on 2010-11-18T12:33:58.000+0000
Have you been tracking for some time? and if so, are you using a case insensitive file system (such as Mac, Windows)? We've noticed oddities like that before when we've renamed files to switch case.
Currently, master only shows a Zend/File/Transfer/Adapter/Http.php file, which leads me to believe this is the case for you. As such, I recommend either doing a new clone, or switching to a case sensitive drive partition.
Posted by Richard Tuin (richardtuin) on 2010-11-18T12:40:49.000+0000
Please note this issue is related to a Unit Test, rather than the library part of the framework. The exact path both of the files are in are in the "/tests/Zend/File/Transfer/Adapter/" folder.
I am running Ubuntu linux, on a case sensitive partition.
Posted by Richard Tuin (richardtuin) on 2010-11-18T12:42:23.000+0000
I think i have valid arguments for reopening this issue.
Posted by Matthew Weier O'Phinney (matthew) on 2010-11-18T12:53:14.000+0000
Missed that it was in "tests"; fixed in current master.