Skip to content

Commit b4ae175

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-36877' into MAGETWO-32004
2 parents 1d54cc8 + 47d06eb commit b4ae175

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

app/code/Magento/OfflinePayments/Block/Form/AbstractInstruction.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ abstract class AbstractInstruction extends \Magento\Payment\Block\Form
2020
/**
2121
* Get instructions text from config
2222
*
23-
* @return string
23+
* @return null|string
2424
*/
2525
public function getInstructions()
2626
{
2727
if ($this->_instructions === null) {
28-
$this->_instructions = $this->getMethod()->getInstructions();
28+
/** @var \Magento\Payment\Model\Method\AbstractMethod $method */
29+
$method = $this->getMethod();
30+
$this->_instructions = $method->getConfigData('instructions');
2931
}
3032
return $this->_instructions;
3133
}

app/code/Magento/OfflinePayments/Test/Unit/Block/Form/AbstractInstructionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ public function testGetInstructions()
2525
{
2626
$method = $this->getMock(
2727
'Magento\Payment\Model\MethodInterface',
28-
['getInstructions', 'getCode', 'getFormBlockType', 'getTitle'],
28+
['getConfigData', 'getCode', 'getFormBlockType', 'getTitle'],
2929
[],
3030
'',
3131
false
3232
);
3333
$method->expects($this->once())
34-
->method('getInstructions')
34+
->method('getConfigData')
3535
->willReturn('instructions');
3636
$this->_model->setData('method', $method);
3737

0 commit comments

Comments
 (0)