Fixed PHPUnit include bug.

Fixed vendor include path bug.
This commit is contained in:
pjskeptic 2013-03-12 22:02:55 -04:00
parent 73310f9bfd
commit 5038e7eb38

View file

@ -138,13 +138,14 @@ class CakeTestSuiteDispatcher {
*/ */
public function loadTestFramework() { public function loadTestFramework() {
foreach (App::path('vendors') as $vendor) { foreach (App::path('vendors') as $vendor) {
if (is_dir($vendor . 'PHPUnit')) { $vendor = rtrim($vendor, DS);
if (is_dir($vendor . DS . 'PHPUnit')) {
ini_set('include_path', $vendor . PATH_SEPARATOR . ini_get('include_path')); ini_set('include_path', $vendor . PATH_SEPARATOR . ini_get('include_path'));
break; break;
} }
} }
return include 'PHPUnit' . DS . 'Autoload.php'; return (include('PHPUnit' . DS . 'Autoload.php')) !== false;
} }
/** /**