mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
First test passing for controllertask test
This commit is contained in:
parent
08bcf55b8d
commit
9647e359c4
1 changed files with 8 additions and 7 deletions
|
@ -89,8 +89,14 @@ class ControllerTaskTest extends CakeTestCase {
|
|||
$this->Task->Template =& new TemplateTask($this->Task->Dispatch);
|
||||
$this->Task->Template->params['theme'] = 'default';
|
||||
|
||||
$this->Task->Model = $this->getMock('ModelTask', array(), array(&$this->Dispatcher));
|
||||
$this->Task->Project = $this->getMock('ProjectTask', array(), array(&$this->Dispatcher));
|
||||
$this->Task->Model = $this->getMock('ModelTask',
|
||||
array('in', 'out', 'err', 'createFile', '_stop', '_checkUnitTest'),
|
||||
array(&$this->Dispatcher)
|
||||
);
|
||||
$this->Task->Project = $this->getMock('ProjectTask',
|
||||
array('in', 'out', 'err', 'createFile', '_stop', '_checkUnitTest'),
|
||||
array(&$this->Dispatcher)
|
||||
);
|
||||
$this->Task->Test = $this->getMock('TestTask', array(), array(&$this->Dispatcher));
|
||||
}
|
||||
|
||||
|
@ -117,11 +123,6 @@ class ControllerTaskTest extends CakeTestCase {
|
|||
$this->Task->expects($this->at(3))->method('out')->with('3. Comments');
|
||||
$this->Task->expects($this->at(4))->method('out')->with('4. Tags');
|
||||
|
||||
$this->Task->expects($this->at(6))->method('out')->with('1. Articles');
|
||||
$this->Task->expects($this->at(7))->method('out')->with('2. ArticlesTags');
|
||||
$this->Task->expects($this->at(8))->method('out')->with('4. Comments');
|
||||
$this->Task->expects($this->at(9))->method('out')->with('5. Tags');
|
||||
|
||||
$expected = array('Articles', 'ArticlesTags', 'Comments', 'Tags');
|
||||
$result = $this->Task->listAll('test_suite');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
|
Loading…
Add table
Reference in a new issue