Skip to content

Commit 970b47e

Browse files
MC-41604: Settings migration in System configuration
- update integration tests
1 parent 60badde commit 970b47e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

dev/tests/integration/testsuite/Magento/Paypal/Block/PayLater/BannerTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public function testToHtml()
142142
$paymentMethod = sprintf('payment/%s/active', Config::METHOD_EXPRESS);
143143
$systemConfig = [
144144
$paymentMethod => 1,
145+
'payment/paypal_paylater/experience_active' => 1,
145146
'payment/paypal_paylater/enabled' => 1,
146147
'payment/paypal_paylater/test3page_display' => 1,
147148
'payment/paypal_paylater/test3page_position' => 'header'
@@ -175,6 +176,7 @@ public function testToHtmlEmpty($systemConfig, $blockConfig)
175176
$paymentMethod = sprintf('payment/%s/active', Config::METHOD_EXPRESS);
176177
$enableSystemConfig = [
177178
$paymentMethod => 1,
179+
'payment/paypal_paylater/experience_active' => 1,
178180
'payment/paypal_paylater/enabled' => 1,
179181
'payment/paypal_paylater/test4page_display' => 1,
180182
'payment/paypal_paylater/test4page_position' => 'near_pp_button'
@@ -203,6 +205,10 @@ public function toHtmlEmptyDataProvider()
203205
{
204206
$paymentPath = 'payment/%s/active';
205207
return [
208+
[
209+
'systemConfig' => ['payment/paypal_paylater/experience_active' => 0],
210+
'blockConfig' => []
211+
],
206212
[
207213
'systemConfig' => ['payment/paypal_paylater/enabled' => 0],
208214
'blockConfig' => []

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ public function getPositionDataProvider()
122122
public function testIsEnabled($systemConfig, $expected)
123123
{
124124
$systemConfig = array_replace([
125+
'payment/paypal_paylater/experience_active' => 1,
125126
'payment/paypal_paylater/enabled' => 1,
126127
'payment/paypal_paylater/test1page_display' => 1
127128
], $systemConfig);
@@ -217,6 +218,13 @@ public function isEnabledDataProvider()
217218
],
218219
false
219220
],
221+
'PayLater experience not active' => [
222+
[
223+
sprintf($paymentPath, Config::METHOD_EXPRESS) => 1,
224+
'payment/paypal_paylater/experience_active' => 0
225+
],
226+
false
227+
],
220228
];
221229
}
222230

0 commit comments

Comments
 (0)