Code Duplication    Length = 10-13 lines in 3 locations

Test/Case/Console/SeederTaskBaseTest.php 3 locations

@@ 419-431 (lines=13) @@
416
	 * @covers ::getRecordsCount
417
	 * @covers ::_enforceRecordMaximum
418
	 */
419
	public function testGetRecordsCountTooHigh() {
420
		$this->_createShellMock(
421
			array('in', 'out', 'hr', 'createFile', 'error', 'err', '_stop', '_showInfo', 'dispatchShell', '_getParameter'),
422
			'PropertiesSetSeederTaskBase'
423
		);
424
425
		$value = '500';
426
		$this->_task->expects($this->at(0))->method('_getParameter')->will($this->returnValue($value));
427
		$this->_task->expects($this->at(1))->method('out')->with($this->equalTo('500 records exceed the allowed maximum amount. Reducing it to 100 records.'));
428
		$result = $this->_task->getRecordsCount();
429
430
		$this->assertEquals(100, $result);
431
	}
432
433
	/**
434
	 * Tests the getRecordsCount method when records is set too low
@@ 440-452 (lines=13) @@
437
	 * @covers ::getRecordsCount
438
	 * @covers ::_enforceRecordMinimum
439
	 */
440
	public function testGetRecordsCountTooLow() {
441
		$this->_createShellMock(
442
			array('in', 'out', 'hr', 'createFile', 'error', 'err', '_stop', '_showInfo', 'dispatchShell', '_getParameter'),
443
			'PropertiesSetSeederTaskBase'
444
		);
445
446
		$value = '1';
447
		$this->_task->expects($this->at(0))->method('_getParameter')->will($this->returnValue($value));
448
		$this->_task->expects($this->at(1))->method('out')->with($this->equalTo('1 records fall below the allowed minimum amount. Increasing it to 5 records.'));
449
		$result = $this->_task->getRecordsCount();
450
451
		$this->assertEquals(5, $result);
452
	}
453
454
	/**
455
	 * Tests the getValidateSeeding method
@@ 625-634 (lines=10) @@
622
	 * @return void
623
	 * @covers ::_getSeederConfigKey
624
	 */
625
	public function testGetSeederConfigKey() {
626
		$this->_createShellMock(
627
			array('in', 'out', 'hr', 'createFile', 'error', 'err', '_stop', '_showInfo', 'dispatchShell', '_getSeederShellName', '_getSeederNamePrefix')
628
		);
629
		$this->_task->expects($this->at(0))->method('_getSeederNamePrefix')->will($this->returnValue('TaskName'));
630
		$this->_task->expects($this->at(1))->method('_getSeederShellName')->will($this->returnValue('FakeSeeder'));
631
		$expected = 'FakeSeeder.TaskName';
632
		$result = $this->_task->getSeederConfigKey();
633
		$this->assertEquals($expected, $result);
634
	}
635
636
	/**
637
	 * Tests the _getSeederConfigKey method