|
9 | 9 | use Magento\Store\Model\ScopeInterface;
|
10 | 10 | use Magento\Framework\App\Config\ScopeConfigInterface;
|
11 | 11 |
|
| 12 | +/** |
| 13 | + * Class ConfigTest |
| 14 | + */ |
12 | 15 | class ConfigTest extends \PHPUnit\Framework\TestCase
|
13 | 16 | {
|
14 | 17 | /**
|
@@ -122,7 +125,7 @@ public function testIsMethodAvailableForIsMethodActive($methodName, $expected)
|
122 | 125 | $valueMap = [
|
123 | 126 | ['paypal/general/merchant_country', ScopeConfigInterface::SCOPE_TYPE_DEFAULT, null, 'US'],
|
124 | 127 | ['paypal/general/merchant_country', ScopeInterface::SCOPE_STORE, null, 'US'],
|
125 |
| - ['payment/paypal_express/disable_funding_options', ScopeConfigInterface::SCOPE_TYPE_DEFAULT, null, []], |
| 128 | + ['paypal/style/disable_funding_options', ScopeConfigInterface::SCOPE_TYPE_DEFAULT, null, []], |
126 | 129 | ];
|
127 | 130 | $this->scopeConfig
|
128 | 131 | ->method('getValue')
|
@@ -362,11 +365,15 @@ public function testGetBmlDisplay($section, $expectedValue, $expectedFlag, $expe
|
362 | 365 | ->will($this->returnValue($expectedFlag));
|
363 | 366 | $this->scopeConfig->expects($this->any())
|
364 | 367 | ->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 | + ); |
370 | 377 | $this->assertEquals($expected, $this->model->getBmlDisplay($section));
|
371 | 378 | }
|
372 | 379 |
|
@@ -407,11 +414,13 @@ public function testGetExpressCheckoutShortcutImageUrl(
|
407 | 414 |
|
408 | 415 | $this->scopeConfig->expects($this->any())
|
409 | 416 | ->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 | + ); |
415 | 424 |
|
416 | 425 | $this->assertEquals(
|
417 | 426 | $result,
|
@@ -475,10 +484,12 @@ public function testGetPaymentMarkImageUrl(
|
475 | 484 |
|
476 | 485 | $this->scopeConfig->expects($this->any())
|
477 | 486 | ->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 | + ); |
482 | 493 |
|
483 | 494 | $this->assertEquals(
|
484 | 495 | $result,
|
|
0 commit comments