Skip to content

Commit ce7b33c

Browse files
author
Oleksii Lisovyi
committed
PayPal - fix configuration path in config model for "Disable Funding Options"
- fixed unit tests failed static tests
1 parent c80bcb9 commit ce7b33c

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

app/code/Magento/Paypal/Test/Unit/Model/ConfigTest.php

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
use Magento\Store\Model\ScopeInterface;
1010
use Magento\Framework\App\Config\ScopeConfigInterface;
1111

12+
/**
13+
* Class ConfigTest
14+
*/
1215
class ConfigTest extends \PHPUnit\Framework\TestCase
1316
{
1417
/**
@@ -362,11 +365,15 @@ public function testGetBmlDisplay($section, $expectedValue, $expectedFlag, $expe
362365
->will($this->returnValue($expectedFlag));
363366
$this->scopeConfig->expects($this->any())
364367
->method('getValue')
365-
->will($this->returnValueMap([
366-
['payment/' . Config::METHOD_WPP_BML . '/' . $section . '_display', 'store', 1, $expectedValue],
367-
['payment/' . Config::METHOD_WPP_BML . '/active', 'store', 1, $expectedValue],
368-
['payment/' . Config::METHOD_WPP_PE_BML . '/active', 'store', 1, $expectedValue],
369-
]));
368+
->will(
369+
$this->returnValueMap(
370+
[
371+
['payment/' . Config::METHOD_WPP_BML . '/' . $section . '_display', 'store', 1, $expectedValue],
372+
['payment/' . Config::METHOD_WPP_BML . '/active', 'store', 1, $expectedValue],
373+
['payment/' . Config::METHOD_WPP_PE_BML . '/active', 'store', 1, $expectedValue],
374+
]
375+
)
376+
);
370377
$this->assertEquals($expected, $this->model->getBmlDisplay($section));
371378
}
372379

@@ -407,11 +414,13 @@ public function testGetExpressCheckoutShortcutImageUrl(
407414

408415
$this->scopeConfig->expects($this->any())
409416
->method('getValue')
410-
->willReturnMap([
411-
['paypal/wpp/button_flavor', ScopeInterface::SCOPE_STORE, 123, $areButtonDynamic],
412-
['paypal/wpp/sandbox_flag', ScopeInterface::SCOPE_STORE, 123, $sandboxFlag],
413-
['paypal/wpp/button_type', ScopeInterface::SCOPE_STORE, 123, $buttonType],
414-
]);
417+
->willReturnMap(
418+
[
419+
['paypal/wpp/button_flavor', ScopeInterface::SCOPE_STORE, 123, $areButtonDynamic],
420+
['paypal/wpp/sandbox_flag', ScopeInterface::SCOPE_STORE, 123, $sandboxFlag],
421+
['paypal/wpp/button_type', ScopeInterface::SCOPE_STORE, 123, $buttonType],
422+
]
423+
);
415424

416425
$this->assertEquals(
417426
$result,
@@ -475,10 +484,12 @@ public function testGetPaymentMarkImageUrl(
475484

476485
$this->scopeConfig->expects($this->any())
477486
->method('getValue')
478-
->willReturnMap([
479-
['paypal/wpp/button_flavor', ScopeInterface::SCOPE_STORE, 123, $areButtonDynamic],
480-
['paypal/wpp/sandbox_flag', ScopeInterface::SCOPE_STORE, 123, $sandboxFlag],
481-
]);
487+
->willReturnMap(
488+
[
489+
['paypal/wpp/button_flavor', ScopeInterface::SCOPE_STORE, 123, $areButtonDynamic],
490+
['paypal/wpp/sandbox_flag', ScopeInterface::SCOPE_STORE, 123, $sandboxFlag],
491+
]
492+
);
482493

483494
$this->assertEquals(
484495
$result,

0 commit comments

Comments
 (0)