@@ -103,6 +103,8 @@ protected function setUp(): void
103
103
*/
104
104
public function testIsAllowedGuestCheckoutConfigSetToTrue ($ productType , $ isAllowed ): void
105
105
{
106
+ $ storeId = 1 ;
107
+
106
108
if ($ isAllowed ) {
107
109
$ this ->resultMock ->expects ($ this ->at (0 ))
108
110
->method ('setIsAllowed ' )
@@ -140,6 +142,10 @@ public function testIsAllowedGuestCheckoutConfigSetToTrue($productType, $isAllow
140
142
->method ('getStore ' )
141
143
->willReturn ($ this ->storeMock );
142
144
145
+ $ this ->storeMock ->expects ($ this ->any ())
146
+ ->method ('getId ' )
147
+ ->willReturn ($ storeId );
148
+
143
149
$ this ->eventMock ->expects ($ this ->once ())
144
150
->method ('getResult ' )
145
151
->willReturn ($ this ->resultMock );
@@ -153,7 +159,7 @@ public function testIsAllowedGuestCheckoutConfigSetToTrue($productType, $isAllow
153
159
->with (
154
160
self ::XML_PATH_DISABLE_GUEST_CHECKOUT ,
155
161
ScopeInterface::SCOPE_STORE ,
156
- $ this -> storeMock
162
+ $ storeId
157
163
)
158
164
->willReturn (true );
159
165
@@ -180,7 +186,7 @@ public function dataProviderForTestisAllowedGuestCheckoutConfigSetToTrue(): arra
180
186
181
187
public function testIsAllowedGuestCheckoutConfigSetToFalse (): void
182
188
{
183
- $ storeCode = 1 ;
189
+ $ storeId = 1 ;
184
190
185
191
$ product = $ this ->getMockBuilder (Product::class)
186
192
->disableOriginalConstructor ()
@@ -212,6 +218,10 @@ public function testIsAllowedGuestCheckoutConfigSetToFalse(): void
212
218
$ this ->eventMock ->expects ($ this ->once ())
213
219
->method ('getStore ' )
214
220
->willReturn ($ this ->storeMock );
221
+
222
+ $ this ->storeMock ->expects ($ this ->any ())
223
+ ->method ('getId ' )
224
+ ->willReturn ($ storeId );
215
225
216
226
$ this ->eventMock ->expects ($ this ->once ())
217
227
->method ('getResult ' )
@@ -226,7 +236,7 @@ public function testIsAllowedGuestCheckoutConfigSetToFalse(): void
226
236
->with (
227
237
self ::XML_PATH_DISABLE_GUEST_CHECKOUT ,
228
238
ScopeInterface::SCOPE_STORE ,
229
- $ this -> storeMock
239
+ $ storeId
230
240
)
231
241
->willReturn (false );
232
242
0 commit comments