Skip to content

Commit

Permalink
Fixing ViewTask test case in Group context.
Browse files Browse the repository at this point in the history
Adding Group test for bake tasks
  • Loading branch information
markstory committed Jul 1, 2009
1 parent 11ecde1 commit f203138
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cake/tests/cases/console/libs/tasks/view.test.php
Expand Up @@ -46,7 +46,7 @@




Mock::generatePartial( Mock::generatePartial(
'ShellDispatcher', 'TestTestTaskMockShellDispatcher', 'ShellDispatcher', 'TestViewTaskMockShellDispatcher',
array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment') array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment')
); );
Mock::generatePartial( Mock::generatePartial(
Expand Down Expand Up @@ -102,7 +102,7 @@ class ViewTaskTest extends CakeTestCase {
* @access public * @access public
*/ */
function startTest() { function startTest() {
$this->Dispatcher =& new TestTestTaskMockShellDispatcher(); $this->Dispatcher =& new TestViewTaskMockShellDispatcher();
$this->Dispatcher->shellPaths = Configure::read('shellPaths'); $this->Dispatcher->shellPaths = Configure::read('shellPaths');
$this->Task =& new MockViewTask($this->Dispatcher); $this->Task =& new MockViewTask($this->Dispatcher);
$this->Task->Dispatch =& $this->Dispatcher; $this->Task->Dispatch =& $this->Dispatcher;
Expand Down
60 changes: 60 additions & 0 deletions cake/tests/groups/bake.group.php
@@ -0,0 +1,60 @@
<?php
/* SVN FILE: $Id$ */
/**
* Bake Group test file
*
* Run all the test cases related to bake.
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake
* @subpackage cake.tests.groups
* @since CakePHP(tm) v 1.2.0.4206
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
/**
* BakeGroupTest class
*
* This test group will run all bake tests
*
* @package cake
* @subpackage cake.tests.groups
*/
class BakeGroupTest extends GroupTest {
/**
* label property
*
* @var string 'All core cache engines'
* @access public
*/
var $label = 'All Tasks related to bake.';
/**
* BakeGroupTest method
*
* @access public
* @return void
*/
function BakeGroupTest() {
$path = CORE_TEST_CASES . DS . 'console' . DS . 'libs' . DS . 'tasks' . DS;
TestManager::addTestFile($this, $path . 'controller');
TestManager::addTestFile($this, $path . 'model');
TestManager::addTestFile($this, $path . 'view');
TestManager::addTestFile($this, $path . 'fixture');
TestManager::addTestFile($this, $path . 'test');
TestManager::addTestFile($this, $path . 'db_config');
TestManager::addTestFile($this, $path . 'project');
}
}
?>

0 comments on commit f203138

Please sign in to comment.