Skip to content
Permalink
Browse files

Code cleanup, break if found, no reason to go through entire vendor l…

…ist overwriting if found on first try. No reason to create variables we don't need.
  • Loading branch information...
webtechnick committed Jun 11, 2012
1 parent 4280951 commit ae990cc0c6a0b372a83b555cbec0741bc0c68eab
Showing with 3 additions and 9 deletions.
  1. +3 −9 lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
@@ -136,20 +136,14 @@ protected function _checkPHPUnit() {
* @return boolean true if found, false otherwise
*/
public function loadTestFramework() {
$found = $path = null;
foreach (App::path('vendors') as $vendor) {
if (is_dir($vendor . 'PHPUnit')) {
$path = $vendor;
ini_set('include_path', $vendor . PATH_SEPARATOR . ini_get('include_path'));
break;
}
}
if($path){
ini_set('include_path', $path . PATH_SEPARATOR . ini_get('include_path'));
}
$found = include 'PHPUnit' . DS . 'Autoload.php';
return $found;
return include 'PHPUnit' . DS . 'Autoload.php';
}
/**

0 comments on commit ae990cc

Please sign in to comment.
You can’t perform that action at this time.