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());
 }
예제 #2
0
 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());
 }