@@ -134,7 +134,7 @@ protected function setUp(): void
134
134
->getMock ();
135
135
$ this ->session = $ this ->getMockBuilder (Quote::class)
136
136
->disableOriginalConstructor ()
137
- ->setMethods (['getCustomerId ' , 'getReordered ' ])
137
+ ->setMethods (['getCustomerId ' , 'getReordered ' , ' getStoreId ' ])
138
138
->getMock ();
139
139
$ this ->dateTimeFactory = $ this ->getMockBuilder (DateTimeFactory::class)
140
140
->disableOriginalConstructor ()
@@ -191,11 +191,19 @@ protected function setUp(): void
191
191
public function testGetTokensComponentsRegisteredCustomer ()
192
192
{
193
193
$ customerId = 1 ;
194
+ $ storeId = 1 ;
194
195
195
196
$ this ->session ->expects (static ::once ())
196
197
->method ('getCustomerId ' )
197
198
->willReturn ($ customerId );
198
199
200
+ $ this ->session ->expects (static ::once ())
201
+ ->method ('getStoreId ' )
202
+ ->willReturn ($ storeId );
203
+
204
+ $ this ->storeManager ->expects (static ::never ())
205
+ ->method ('getStore ' );
206
+
199
207
$ this ->paymentDataHelper ->expects (static ::once ())
200
208
->method ('getMethodInstance ' )
201
209
->with (self ::VAULT_PAYMENT_CODE )
@@ -250,7 +258,12 @@ public function testGetTokensComponentsGuestCustomer()
250
258
{
251
259
$ customerId = null ;
252
260
253
- $ this ->initStoreMock ();
261
+ $ this ->session ->expects (static ::once ())
262
+ ->method ('getStoreId ' )
263
+ ->willReturn (null );
264
+
265
+ $ this ->storeManager ->expects (static ::once ())
266
+ ->method ('getStore ' );
254
267
255
268
$ this ->session ->expects (static ::once ())
256
269
->method ('getCustomerId ' )
0 commit comments