->
method('fromArray'
) ->
with(['filter' =>
$filter]) ->
willReturn($criteria);
$data =
[ ['primaryKey' =>
['productId' => 'product-1', 'categoryId' => 'category-1'
], 'data' =>
[]],
['primaryKey' =>
['productId' => 'product-1', 'categoryId' => 'category-2'
], 'data' =>
[]],
['primaryKey' =>
['productId' => 'product-2', 'categoryId' => 'category-1'
], 'data' =>
[]],
['primaryKey' =>
['productId' => 'product-2', 'categoryId' => 'category-2'
], 'data' =>
[]],
];
$ids =
new IdSearchResult(4,
$data,
new Criteria(), Context::
createDefaultContext());
$searcher->
expects(static::
once()) ->
method('search'
) ->
willReturn($ids);
$service =
new SyncService( $writer,
$this->
createMock(EventDispatcherInterface::
class),
new StaticDefinitionInstanceRegistry( [ProductCategoryDefinition::
class],
$this->
createMock(ValidatorInterface::
class),