mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing bake task tests and adding ConsoleErrorHandler to the AllShells suite.
This commit is contained in:
parent
f94fcfb749
commit
f677c4ab44
4 changed files with 8 additions and 8 deletions
|
@ -39,7 +39,7 @@ class AllShellsTest extends PHPUnit_Framework_TestSuite {
|
|||
$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 @@ class BakeShellTest extends CakeTestCase {
|
|||
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 @@ class FixtureTaskTest extends CakeTestCase {
|
|||
* @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 @@ class TestTaskTest extends CakeTestCase {
|
|||
)
|
||||
));
|
||||
$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();
|
||||
|
|
Loading…
Reference in a new issue