Error that I'm getting when trying to run tests:
Fatal error: Class 'PHPUnit_Util_Diff' not found in Cake/TestSuite/Reporter/CakeHtmlReporter.php on line 267
As per this question, and the answers there, I need to install PHPUnit 3.6.x to avoid the missing Class error. How can I install this, now deprecated, version?
I've tried using composer like this:
composer global require "phpunit/phpunit=3.6.*"
But I get the following error
Problem 1
- The requested package phpunit/phpunit could not be found in any version, there may be a typo in the package name.
I've tried PEAR with this command:
sudo pear install phpunit/PHPUnit-3.6.12
but I get this error:
Attempting to discover channel "phpunit"...
Attempting fallback to https instead of http on channel "phpunit"...
unknown channel "phpunit" in "phpunit/phpunit-3.6.12"
invalid package name/package file "phpunit/phpunit-3.6.12"
install failed
I have found an answer here which points me to dereuromark's plugin, which is deprecated and suggests that I use composer since the pear channel for PHPUnit has been shutdown. Not to mention that it's version 3.7.x, which is missing the Class I need. So, I've come full circle.
tl;dr How do install PHPUnit 3.6.x for the CakePHP 2.4.x?
UPDATE: I checked that the same class is used in the latest CakePHP 2.x version. Also, I should mention that test ran correctly on a similar, but older VM that had the older PHPUnit installed.