|
|
@@ -27,10 +27,12 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|
|
* Preload a number of classes to ensure they're available once we've disabled
|
|
|
* other autoloaders.
|
|
|
*/
|
|
|
-require_once 'PHPUnit/Framework/Constraint/IsEqual.php';
|
|
|
-require_once 'PHPUnit/Framework/Constraint/IsInstanceOf.php';
|
|
|
-require_once 'PHPUnit/Framework/Constraint/IsNull.php';
|
|
|
-require_once 'PHPUnit/Framework/Constraint/IsTrue.php';
|
|
|
+if (version_compare(PHPUnit_Runner_Version::id(), '4.0.0', '<')) {
|
|
|
+ require_once 'PHPUnit/Framework/Constraint/IsEqual.php';
|
|
|
+ require_once 'PHPUnit/Framework/Constraint/IsInstanceOf.php';
|
|
|
+ require_once 'PHPUnit/Framework/Constraint/IsNull.php';
|
|
|
+ require_once 'PHPUnit/Framework/Constraint/IsTrue.php';
|
|
|
+}
|
|
|
require_once 'Zend/Loader/AutoloaderFactory.php';
|
|
|
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
|
|
require_once 'Zend/Loader/StandardAutoloader.php';
|
|
|
@@ -54,7 +56,7 @@ class Zend_Loader_AutoloaderFactoryTest extends PHPUnit_Framework_TestCase
|
|
|
$this->loaders = array();
|
|
|
}
|
|
|
|
|
|
- // Clear out other autoloaders to ensure those being tested are at the
|
|
|
+ // Clear out other autoloaders to ensure those being tested are at the
|
|
|
// top of the stack
|
|
|
foreach ($this->loaders as $loader) {
|
|
|
spl_autoload_unregister($loader);
|
|
|
@@ -108,7 +110,7 @@ class Zend_Loader_AutoloaderFactoryTest extends PHPUnit_Framework_TestCase
|
|
|
}
|
|
|
include dirname(__FILE__) . '/_files/InvalidInterfaceAutoloader.php';
|
|
|
Zend_Loader_AutoloaderFactory::factory(array(
|
|
|
- 'InvalidInterfaceAutoloader' => array()
|
|
|
+ 'InvalidInterfaceAutoloader' => array()
|
|
|
));
|
|
|
}
|
|
|
|