Zend Studio 8 has phpUnit integration and a dedicated view, which is great, so I would like to use it... but:
When I run my phpunit.xml on the command line, the tests are executed just fine, when I try to run phpunit.xml in Zend Studio as unit test, I get the following fatal error:
Fatal error: Uncaught exception 'PHPUnit_Framework_Error' with message 'Assigning the return value of new by reference is deprecated' in C:\Program Files (x86)\Zend\ZendServer\bin\PEAR\PEAR\Config.php:650
Stack trace:
#0 C:\Program Files (x86)\Zend\ZendServer\bin\PEAR\PEAR\RunTest.php(22): ZendPHPUnitErrorHandler->handle(8192, 'Assigning the r...', 'C:\Program File...', 650, Array)
#1 C:\Program Files (x86)\Zend\ZendServer\bin\PEAR\PEAR\RunTest.php(22): require_once()
#2 C:\Program Files (x86)\Zend\ZendServer\bin\PEAR\PHPUnit\Extensions\PhptTestCase.php(49): require_once('C:\Program File...')
#3 C:\Program Files (x86)\Zend\Zend Studio - 8.0.0\plugins\com.zend.php.phpunit_8.0.0.v20101001-0100\resources\ZendPHPUnit.php(103): require_once('C:\Program File...')
#4 {main} thrown in C:\Program Files (x86)\Zend\ZendServer\bin\PEAR\PEAR\Config.php on line 650
I really don't have a clue what that means... why should some deprecated code in the PEAR config keep my tests from running?
[edit] Some additional information:
My colleague who has neither PEAR nor phpunit installed, can run unit tests from Zend Studio 8 just fine but he can't run any from the CLI. So it seems that Zend Studio not only integrates with phpUnit but comes bundled with a version of it. I wanted the newest version and that's why I installed PEAR and then via PEAR I installed phpUnit. As a consequence, the phpUnit library of Zend Studio was outdated and I had to replace the file 'ZendPHPUnit.php' in the Zend Studio plugin folder with a version of a Zend Forum user. This lead to correct inclusion of the phpUnit classes and the current problem. [/edit]