@@ 257-267 (lines=11) @@ | ||
254 | * @return void |
|
255 | * @covers ::getModelsToTruncate |
|
256 | */ |
|
257 | public function testGetModelsToTruncate() { |
|
258 | $this->_createShellMock( |
|
259 | array('in', 'out', 'hr', 'createFile', 'error', 'err', '_stop', '_showInfo', 'dispatchShell', 'getModelName') |
|
260 | ); |
|
261 | $expected = array('YetAnotherModel'); |
|
262 | $this->_task->expects($this->at(0))->method('getModelName')->will($this->returnValue('YetAnotherModel')); |
|
263 | ||
264 | $result = $this->_task->getModelsToTruncate(); |
|
265 | ||
266 | $this->assertEquals($expected, $result); |
|
267 | } |
|
268 | ||
269 | /** |
|
270 | * Tests the fixtureRecords method |
|
@@ 344-352 (lines=9) @@ | ||
341 | * @return void |
|
342 | * @covers ::getModelName |
|
343 | */ |
|
344 | public function testGetModelName() { |
|
345 | $this->_createShellMock( |
|
346 | array('in', 'out', 'hr', 'createFile', 'error', 'err', '_stop', '_showInfo', 'dispatchShell', '_getSeederNamePrefix') |
|
347 | ); |
|
348 | $expected = 'AModelName'; |
|
349 | $this->_task->expects($this->at(0))->method('_getSeederNamePrefix')->will($this->returnValue($expected)); |
|
350 | $result = $this->_task->getModelName(); |
|
351 | $this->assertEquals($expected, $result); |
|
352 | } |
|
353 | ||
354 | /** |
|
355 | * Tests the getModelName method |
|
@@ 642-651 (lines=10) @@ | ||
639 | * @return void |
|
640 | * @covers ::_getSeederConfigKey |
|
641 | */ |
|
642 | public function testGetSeederConfigKeyPropertySet() { |
|
643 | $this->_createShellMock( |
|
644 | array('in', 'out', 'hr', 'createFile', 'error', 'err', '_stop', '_showInfo', 'dispatchShell', '_getSeederShellName'), |
|
645 | 'PropertiesSetSeederTaskBase' |
|
646 | ); |
|
647 | $this->_task->expects($this->at(0))->method('_getSeederShellName')->will($this->returnValue('FakeSeeder')); |
|
648 | $expected = 'FakeSeeder.CustomConfigKey'; |
|
649 | $result = $this->_task->getSeederConfigKey(); |
|
650 | $this->assertEquals($expected, $result); |
|
651 | } |
|
652 | ||
653 | /** |
|
654 | * Tests the _getSeederNamePrefix method |