/** * @covers Box\TestScribe\InputHistory\InputHistoryData::setInputStringToHistory * @covers Box\TestScribe\InputHistory\InputHistoryData::getInputStringFromHistory */ public function testGetInputStringFromHistory() { // Execute the method under test. $objectUnderTest = new InputHistory\InputHistoryData(); $objectUnderTest->setInputStringToHistory('s', 'i', 'a'); // Validate the execution result. $value = $objectUnderTest->getInputStringFromHistory('s', 'i'); $this->assertSame('a', $value); // return '' for non existing items $value = $objectUnderTest->getInputStringFromHistory('none', 'i'); $this->assertSame('', $value); $value = $objectUnderTest->getInputStringFromHistory('s', 'none'); $this->assertSame('', $value); }
/** * @covers Box\TestScribe\InputHistory\InputHistoryData::getInputStringFromHistory */ public function testGetInputStringFromHistoryNonExistingItem() { // Execute the method under test. $objectUnderTest = new InputHistory\InputHistoryData(); $executionResult = $objectUnderTest->getInputStringFromHistory('section', 'item'); // Validate the execution result. $expected = ''; $this->assertSame($expected, $executionResult, 'Variable ( executionResult ) doesn\'t have the expected value.'); }