Skip to content

Commit 5c65fac

Browse files
committed
MC-41701: PP PayLater for Product Page
- Fix tests after merge
1 parent abc0f4a commit 5c65fac

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

app/code/Magento/Paypal/Block/PayLater/Banner.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ class Banner extends Template
2222
*/
2323
private $payLaterConfig;
2424

25+
/**
26+
* @var SdkUrl
27+
*/
28+
private $sdkUrl;
29+
2530
/**
2631
* @var string
2732
*/
@@ -110,7 +115,7 @@ private function getPayPalSdkUrl(): string
110115
*/
111116
private function getStyleAttributesConfig(): array
112117
{
113-
return $this->payLaterConfig->getSectionConfig($this->placement, PayLaterConfig::CONFIG_KEY_STYLES);
118+
return $this->payLaterConfig->getSectionConfig($this->placement, PayLaterConfig::CONFIG_KEY_STYLE);
114119
}
115120

116121
/**

app/code/Magento/Paypal/Model/PayLaterConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class PayLaterConfig
1717
/**
1818
* Configuration key for Styles settings
1919
*/
20-
const CONFIG_KEY_STYLES = 'styles';
20+
const CONFIG_KEY_STYLE = 'style';
2121

2222
/**
2323
* Configuration key for Position setting

dev/tests/integration/testsuite/Magento/Paypal/Model/PayLaterConfigTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testGetStyleConfig($systemConfig, $expectedConfig)
2727

2828
/** @var PayLaterConfig $config */
2929
$config = Bootstrap::getObjectManager()->get(PayLaterConfig::class);
30-
$this->assertEquals($expectedConfig, $config->getStyleConfig('test1'));
30+
$this->assertEquals($expectedConfig, $config->getSectionConfig('test1', PayLaterConfig::CONFIG_KEY_STYLE));
3131
}
3232

3333
/**
@@ -85,7 +85,7 @@ public function testGetPositionConfig($systemConfig, $expectedConfig)
8585

8686
/** @var PayLaterConfig $config */
8787
$config = Bootstrap::getObjectManager()->get(PayLaterConfig::class);
88-
$this->assertEquals($expectedConfig, $config->getPositionConfig('test1'));
88+
$this->assertEquals($expectedConfig, $config->getSectionConfig('test1', PayLaterConfig::CONFIG_KEY_POSITION));
8989
}
9090

9191
/**

0 commit comments

Comments
 (0)