Browse Source

Throwing an exception if no PHPUnit is installed and running from console

Jose Lorenzo Rodriguez 15 years ago
parent
commit
8fa73e9650
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lib/Cake/Console/Command/TestsuiteShell.php

+ 4 - 1
lib/Cake/Console/Command/TestsuiteShell.php

@@ -163,7 +163,10 @@ class TestsuiteShell extends Shell {
  */
 	public function initialize() {
 		$this->_dispatcher = new CakeTestSuiteDispatcher();
-		$this->_dispatcher->loadTestFramework();
+		$sucess = $this->_dispatcher->loadTestFramework();
+		if (!$sucess) {
+			throw new Exception(__d('cake_dev', 'Please install PHPUnit framework (http://www.phpunit.de)'));
+		}
 	}
 
 /**