mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
Fixing ViewTask test case in Group context.
Adding Group test for bake tasks
This commit is contained in:
parent
11ecde194d
commit
f2031385c1
2 changed files with 62 additions and 2 deletions
|
@ -46,7 +46,7 @@ require_once CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'project.php'
|
||||||
|
|
||||||
|
|
||||||
Mock::generatePartial(
|
Mock::generatePartial(
|
||||||
'ShellDispatcher', 'TestTestTaskMockShellDispatcher',
|
'ShellDispatcher', 'TestViewTaskMockShellDispatcher',
|
||||||
array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment')
|
array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment')
|
||||||
);
|
);
|
||||||
Mock::generatePartial(
|
Mock::generatePartial(
|
||||||
|
@ -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;
|
||||||
|
|
60
cake/tests/groups/bake.group.php
Normal file
60
cake/tests/groups/bake.group.php
Normal file
|
@ -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');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
Loading…
Add table
Reference in a new issue