@@ -134,7 +134,7 @@ protected function setUp(): void
134134 ->getMock ();
135135 $ this ->session = $ this ->getMockBuilder (Quote::class)
136136 ->disableOriginalConstructor ()
137- ->setMethods (['getCustomerId ' , 'getReordered ' ])
137+ ->setMethods (['getCustomerId ' , 'getReordered ' , ' getStoreId ' ])
138138 ->getMock ();
139139 $ this ->dateTimeFactory = $ this ->getMockBuilder (DateTimeFactory::class)
140140 ->disableOriginalConstructor ()
@@ -191,11 +191,19 @@ protected function setUp(): void
191191 public function testGetTokensComponentsRegisteredCustomer ()
192192 {
193193 $ customerId = 1 ;
194+ $ storeId = 1 ;
194195
195196 $ this ->session ->expects (static ::once ())
196197 ->method ('getCustomerId ' )
197198 ->willReturn ($ customerId );
198199
200+ $ this ->session ->expects (static ::once ())
201+ ->method ('getStoreId ' )
202+ ->willReturn ($ storeId );
203+
204+ $ this ->storeManager ->expects (static ::never ())
205+ ->method ('getStore ' );
206+
199207 $ this ->paymentDataHelper ->expects (static ::once ())
200208 ->method ('getMethodInstance ' )
201209 ->with (self ::VAULT_PAYMENT_CODE )
@@ -250,7 +258,12 @@ public function testGetTokensComponentsGuestCustomer()
250258 {
251259 $ customerId = null ;
252260
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 ' );
254267
255268 $ this ->session ->expects (static ::once ())
256269 ->method ('getCustomerId ' )
0 commit comments