$this->
createProduct($productId);
$message =
new ProductStreamMappingIndexingMessage($streamId, null, Context::
createDefaultContext());
$this->productStreamUpdater->
handle($message);
$criteria =
new Criteria([$productId]);
$criteria->
addAssociation('streams'
);
$product =
$this->productRepository->
search($criteria, Context::
createDefaultContext())->
first();
static::
assertEquals(1,
$product->
getStreams()->
count());
static::
assertEquals($streamId,
$product->
getStreams()->
first()->
getId());
static::
assertContains($streamId,
$product->
getStreamIds());
} /**
* @return iterable<string, array<int, array<int, array<string, array<string, int>|string>>>>
*/
public static function filterProvider(): iterable
{ yield 'Active filter' =>
[ [[ 'type' => 'equals',
'field' => 'active',