Skip to content
Permalink
Browse files

Fixing bake task tests and adding ConsoleErrorHandler to the AllShell…

…s suite.
  • Loading branch information...
markstory committed Sep 8, 2010
1 parent f94fcfb commit f677c4ab44e60763da9aa087f18aeb51b5123678
@@ -39,7 +39,7 @@ public static function suite() {
$path = CORE_TEST_CASES . DS . 'console' . DS . 'libs' . DS;
$suite->addTestFile(CORE_TEST_CASES . DS . 'console' . DS . 'cake.test.php');
$suite->addTestFile(CORE_TEST_CASES . DS . 'console' . DS . 'error_console_handler.test.php');
$suite->addTestFile(CORE_TEST_CASES . DS . 'console' . DS . 'console_error_handler.test.php');
$tasks = array('acl', 'api', 'bake', 'schema', 'shell');
foreach ($tasks as $task) {
$suite->addTestFile($path . $task . '.test.php');
@@ -91,10 +91,10 @@ public function testAllWithModelName() {
if ($this->skipIf($userExists, 'User class exists, cannot test `bake all [param]`. %s')) {
return;
}
$this->Shell->Model = $this->getMock('ModelTask', array(), array(&$this->Dispatch));
$this->Shell->Controller = $this->getMock('ControllerTask', array(), array(&$this->Dispatch));
$this->Shell->View = $this->getMock('ModelTask', array(), array(&$this->Dispatch));
$this->Shell->DbConfig = $this->getMock('DbConfigTask', array(), array(&$this->Dispatch));
$this->Shell->Model = $this->getMock('ModelTask', array(), array(&$this->Dispatcher));
$this->Shell->Controller = $this->getMock('ControllerTask', array(), array(&$this->Dispatcher));
$this->Shell->View = $this->getMock('ModelTask', array(), array(&$this->Dispatcher));
$this->Shell->DbConfig = $this->getMock('DbConfigTask', array(), array(&$this->Dispatcher));
$this->Shell->DbConfig->expects($this->once())->method('getConfig')->will($this->returnValue('test_suite'));
@@ -87,8 +87,8 @@ public function endTest() {
* @return void
*/
public function testConstruct() {
$this->Dispatch->params['working'] = DS . 'my' . DS . 'path';
$Task = new FixtureTask($this->Dispatch);
$this->Dispatcher->params['working'] = DS . 'my' . DS . 'path';
$Task = new FixtureTask($this->Dispatcher);
$expected = DS . 'my' . DS . 'path' . DS . 'tests' . DS . 'fixtures' . DS;
$this->assertEqual($Task->path, $expected);
@@ -368,7 +368,7 @@ public function testRegistryClearWhenBuildingTestObjects() {
)
));
$keys = ClassRegistry::keys();
$this->assertTrue(in_array('random', $keys));
$this->assertTrue(in_array('test_task_comment', $keys));
$object =& $this->Task->buildTestSubject('Model', 'TestTaskComment');
$keys = ClassRegistry::keys();

0 comments on commit f677c4a

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