$this->
createMock(EventDispatcherInterface::
class),
new StaticDefinitionInstanceRegistry( [ProductDefinition::
class],
$this->
createMock(ValidatorInterface::
class),
$this->
createMock(EntityWriteGatewayInterface::
class),
),
$this->
createMock(EntitySearcherInterface::
class),
$this->
createMock(RequestCriteriaBuilder::
class),
$this->
createMock(SyncFkResolver::
class) );
$upsert =
new SyncOperation('foo', 'product', SyncOperation::ACTION_UPSERT,
[ ['id' => '1', 'name' => 'foo'
],
['id' => '2', 'name' => 'bar'
],
]);
$delete =
new SyncOperation('delete-foo', 'product', SyncOperation::ACTION_DELETE,
[ ['id' => '1'
],
['id' => '2'
],
]);
$behavior =
new SyncBehavior('disable-indexing',
['product.indexer'
]);
$result =
$service->
sync([$upsert,
$delete], Context::
createDefaultContext(),
$behavior);