Adding skip for BakeShell test, if a User class exists bake all cannot be tested.

This commit is contained in:
Mark Story 2009-12-19 20:01:59 -05:00
parent c669f8c998
commit 3edb84d77c

View file

@ -95,6 +95,11 @@ class BakeShellTestCase extends CakeTestCase {
* @access public * @access public
*/ */
function testAllWithModelName() { function testAllWithModelName() {
App::import('Model', 'User');
$userExists = class_exists('User');
if ($this->skipIf($userExists, 'User class exists, cannot test `bake all [param]`. %s')) {
return;
}
$this->Shell->Model =& new BakeShellMockModelTask(); $this->Shell->Model =& new BakeShellMockModelTask();
$this->Shell->Controller =& new BakeShellMockControllerTask(); $this->Shell->Controller =& new BakeShellMockControllerTask();
$this->Shell->View =& new BakeShellMockModelTask(); $this->Shell->View =& new BakeShellMockModelTask();