Fixing bake's unit test detection so it checks for PHPUnit properly.

Fixes #1505
This commit is contained in:
mark_story 2011-02-04 21:56:24 -05:00
parent 7b34d879dc
commit 8e267f7be2

View file

@ -628,7 +628,10 @@ class Shell extends Object {
* @return boolean Success
*/
protected function _checkUnitTest() {
if (App::import('vendor', 'simpletest' . DS . 'simpletest')) {
if (App::import('Vendor', 'phpunit', array('file' => 'PHPUnit' . DS . 'Autoload.php'))) {
return true;
}
if (@include 'PHPUnit' . DS . 'Autoload.php') {
return true;
}
$prompt = 'PHPUnit is not installed. Do you want to bake unit test files anyway?';