Permalink
Browse files

No longer suppress the include path to PHPUnit/Autoload.php as Autolo…

…ad.php require_once() on two files, if either of them aren't there the shell exits without message. Explanation of issue here: http://www.webtechnick.com/wtn/blogs/view/247/Fixing_PHPUnit_for_CakePHP_2_x_testing_on_Mac_OS_X
  • Loading branch information...
1 parent c318586 commit 42809512f0deeffd664d615a9d65904b6e25f94c @webtechnick webtechnick committed Jun 11, 2012
Showing with 8 additions and 12 deletions.
  1. +8 −12 lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
@@ -138,21 +138,17 @@ protected function _checkPHPUnit() {
public function loadTestFramework() {
$found = $path = null;
- if (@include 'PHPUnit' . DS . 'Autoload.php') {
- $found = true;
- }
-
- if (!$found) {
- foreach (App::path('vendors') as $vendor) {
- if (is_dir($vendor . 'PHPUnit')) {
- $path = $vendor;
- }
+ foreach (App::path('vendors') as $vendor) {
+ if (is_dir($vendor . 'PHPUnit')) {
+ $path = $vendor;
}
+ }
- if ($path && ini_set('include_path', $path . PATH_SEPARATOR . ini_get('include_path'))) {
- $found = include 'PHPUnit' . DS . 'Autoload.php';
- }
+ if($path){
+ ini_set('include_path', $path . PATH_SEPARATOR . ini_get('include_path'));
}
+
+ $found = include 'PHPUnit' . DS . 'Autoload.php';
return $found;
}

0 comments on commit 4280951

Please sign in to comment.