@@ -207,15 +207,15 @@ public function testCallbackValidateProduct($validate): void
207207 'updated_at ' => '2014-06-25 14:37:15 '
208208 ];
209209 $ this ->storeManager ->expects ($ this ->any ())->method ('getWebsites ' )->with (false )
210- ->willReturn ([$ this ->websiteModel , $ this ->websiteModel ]);
210+ ->willReturn ([$ this ->websiteModel , $ this ->websiteModel , $ this -> websiteModel ]);
211211 $ this ->websiteModel
212212 ->method ('getId ' )
213- ->willReturnOnConsecutiveCalls ('1 ' , '2 ' );
213+ ->willReturnOnConsecutiveCalls ('1 ' , '2 ' , ' 3 ' );
214214 $ this ->websiteModel ->expects ($ this ->any ())->method ('getDefaultStore ' )
215215 ->willReturn ($ this ->storeModel );
216216 $ this ->storeModel
217217 ->method ('getId ' )
218- ->willReturnOnConsecutiveCalls ('1 ' , '2 ' );
218+ ->willReturnOnConsecutiveCalls ('1 ' , '2 ' , ' 3 ' );
219219 $ this ->combineFactory ->expects ($ this ->any ())->method ('create ' )
220220 ->willReturn ($ this ->condition );
221221 $ this ->condition ->expects ($ this ->any ())->method ('validate ' )
@@ -224,12 +224,14 @@ public function testCallbackValidateProduct($validate): void
224224 $ this ->productModel ->expects ($ this ->any ())->method ('getId ' )
225225 ->willReturn (1 );
226226
227+ $ this ->rule ->setWebsiteIds ('1,2 ' );
227228 $ this ->rule ->callbackValidateProduct ($ args );
228229
229230 $ matchingProducts = $ this ->rule ->getMatchingProductIds ();
230231 foreach ($ matchingProducts ['1 ' ] as $ matchingRules ) {
231232 $ this ->assertEquals ($ validate , $ matchingRules );
232233 }
234+ $ this ->assertNull ($ matchingProducts ['1 ' ]['3 ' ] ?? null );
233235 }
234236
235237 /**
0 commit comments