Skip to content

Commit

Permalink
Fixed PHPUnit include bug.
Browse files Browse the repository at this point in the history
Fixed vendor include path bug.
  • Loading branch information
psparrow committed Mar 13, 2013
1 parent 73310f9 commit 5038e7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
Expand Up @@ -138,13 +138,14 @@ protected function _checkPHPUnit() {
*/
public function loadTestFramework() {
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'));
break;
}
}

return include 'PHPUnit' . DS . 'Autoload.php';
return (include('PHPUnit' . DS . 'Autoload.php')) !== false;
}

/**
Expand Down

0 comments on commit 5038e7e

Please sign in to comment.