|
@@ 221-232 (lines=12) @@
|
| 218 |
|
* @return void |
| 219 |
|
* @covers ::getFieldFormatters |
| 220 |
|
*/ |
| 221 |
|
public function testGetFieldFormattersManualMode() { |
| 222 |
|
$this->_createProcessorMock(array('_guessFieldFormatters')); |
| 223 |
|
|
| 224 |
|
$expected = array('field formatters from manual mode'); |
| 225 |
|
|
| 226 |
|
$this->_seeder->expects($this->at(0))->method('getSeedingMode')->will($this->returnValue('manual')); |
| 227 |
|
$this->_seeder->expects($this->at(1))->method('fieldFormatters')->will($this->returnValue($expected)); |
| 228 |
|
$this->_processor->expects($this->never())->method('_guessFieldFormatters'); |
| 229 |
|
|
| 230 |
|
$result = $this->_processor->getFieldFormatters(); |
| 231 |
|
$this->assertEquals($expected, $result); |
| 232 |
|
} |
| 233 |
|
|
| 234 |
|
/** |
| 235 |
|
* Tests the getFieldFormatters method for 'auto' mode |
|
@@ 240-251 (lines=12) @@
|
| 237 |
|
* @return void |
| 238 |
|
* @covers ::getFieldFormatters |
| 239 |
|
*/ |
| 240 |
|
public function testGetFieldFormattersAutolMode() { |
| 241 |
|
$this->_createProcessorMock(array('_guessFieldFormatters')); |
| 242 |
|
|
| 243 |
|
$expected = array('field formatters from auto mode'); |
| 244 |
|
|
| 245 |
|
$this->_seeder->expects($this->at(0))->method('getSeedingMode')->will($this->returnValue('auto')); |
| 246 |
|
$this->_seeder->expects($this->never())->method('fieldFormatters'); |
| 247 |
|
$this->_processor->expects($this->at(0))->method('_guessFieldFormatters')->will($this->returnValue($expected)); |
| 248 |
|
|
| 249 |
|
$result = $this->_processor->getFieldFormatters(); |
| 250 |
|
$this->assertEquals($expected, $result); |
| 251 |
|
} |
| 252 |
|
|
| 253 |
|
/** |
| 254 |
|
* Tests the getFieldFormatters method for 'mixed' mode |