Example #1
0
 public function testGetInstructionsSetInformation()
 {
     $this->assertNull($this->_instructions->getInstructions());
     $testInstruction = 'second test';
     $this->_info->setAdditionalInformation('instructions', $testInstruction);
     $this->assertEquals($testInstruction, $this->_instructions->getInstructions());
 }
 public function testGetInstruction()
 {
     $methodInstance = $this->getMockBuilder('Magento\\Payment\\Model\\MethodInterface')->getMockForAbstractClass();
     $methodInstance->expects($this->once())->method('getConfigData')->with('instructions')->willReturn('get the instruction here');
     $this->_info->expects($this->once())->method('getAdditionalInformation')->with('instructions')->willReturn(false);
     $this->_info->expects($this->once())->method('getMethodInstance')->willReturn($methodInstance);
     $this->assertEquals('get the instruction here', $this->_instructions->getInstructions());
 }
 public function testGetInstruction()
 {
     $methodInstance = $this->getMock('Magento\\Payment\\Model\\MethodInterface', ['getConfigData', 'getCode', 'getFormBlockType', 'getTitle'], [], '', false);
     $methodInstance->expects($this->once())->method('getConfigData')->with('instructions')->willReturn('get the instruction here');
     $this->_info->expects($this->once())->method('getAdditionalInformation')->with('instructions')->willReturn(false);
     $this->_info->expects($this->once())->method('getMethodInstance')->willReturn($methodInstance);
     $this->assertEquals('get the instruction here', $this->_instructions->getInstructions());
 }