File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ public function getConfig(string $page): array
93
93
'isGuestCheckoutAllowed ' => $ isGuestCheckoutAllowed ,
94
94
'sdkUrl ' => $ this ->sdkUrl ->getUrl (),
95
95
'dataAttributes ' => [
96
- 'data-partner-attribution-id ' => $ config ->getBuildNotationCode () != '' ?
96
+ 'data-partner-attribution-id ' => $ config ->getBuildNotationCode () != '' ?
97
97
$ config ->getBuildNotationCode () : ''
98
98
]
99
99
];
Original file line number Diff line number Diff line change 16
16
use Magento \Store \Model \StoreManagerInterface ;
17
17
use PHPUnit \Framework \MockObject \MockObject ;
18
18
use PHPUnit \Framework \TestCase ;
19
+ use Magento \Paypal \Model \Payflowpro ;
19
20
20
21
/**
21
22
* Test for smart button config
@@ -37,6 +38,11 @@ class SmartButtonConfigTest extends TestCase
37
38
*/
38
39
private $ configMock ;
39
40
41
+ /**
42
+ * @var Payflowpro
43
+ */
44
+ private $ payflowpro ;
45
+
40
46
/**
41
47
* @inheritDoc
42
48
*/
@@ -47,6 +53,9 @@ protected function setUp(): void
47
53
->disableOriginalConstructor ()
48
54
->getMock ();
49
55
56
+ $ this ->payflowproMock = $ this ->getMockBuilder (Payflowpro::class)
57
+ ->getMock ();
58
+
50
59
/** @var ScopeConfigInterface|MockObject $scopeConfigMock */
51
60
$ scopeConfigMock = $ this ->getMockForAbstractClass (ScopeConfigInterface::class);
52
61
$ scopeConfigMock ->method ('isSetFlag ' )
@@ -68,6 +77,7 @@ protected function setUp(): void
68
77
$ scopeConfigMock ,
69
78
$ sdkUrl ,
70
79
$ this ->getDefaultStyles (),
80
+ $ this ->payflowproMock
71
81
);
72
82
}
73
83
@@ -116,6 +126,7 @@ public function testGetConfig(
116
126
);
117
127
118
128
self ::assertEquals ($ expected , $ this ->model ->getConfig ($ page ));
129
+
119
130
}
120
131
121
132
/**
Original file line number Diff line number Diff line change 29
29
'isGuestCheckoutAllowed ' => true ,
30
30
'sdkUrl ' => 'http://mock.url ' ,
31
31
'dataAttributes ' => [
32
- 'data-partner-attribution-id ' => 'Magento_2_%s '
32
+ 'data-partner-attribution-id ' => 'Magento_2_%s '
33
33
]
34
34
]
35
35
],
56
56
'isGuestCheckoutAllowed ' => true ,
57
57
'sdkUrl ' => 'http://mock.url ' ,
58
58
'dataAttributes ' => [
59
- 'data-partner-attribution-id ' => 'Magento_2_%s '
59
+ 'data-partner-attribution-id ' => 'Magento_2_%s '
60
60
]
61
61
]
62
62
],
82
82
'isGuestCheckoutAllowed ' => true ,
83
83
'sdkUrl ' => 'http://mock.url ' ,
84
84
'dataAttributes ' => [
85
- 'data-partner-attribution-id ' => 'Magento_2_%s '
85
+ 'data-partner-attribution-id ' => 'Magento_2_%s '
86
86
]
87
87
]
88
88
],
108
108
'isGuestCheckoutAllowed ' => true ,
109
109
'sdkUrl ' => 'http://mock.url ' ,
110
110
'dataAttributes ' => [
111
- 'data-partner-attribution-id ' => 'Magento_2_%s '
111
+ 'data-partner-attribution-id ' => 'Magento_2_%s '
112
112
]
113
113
]
114
114
],
You can’t perform that action at this time.
0 commit comments