SyncService example


                'product' => [new EntityWriteResult('created-id', [], 'product', EntityWriteResult::OPERATION_INSERT)],
            ]
        );

        $writer = $this->createMock(EntityWriterInterface::class);
        $writer
            ->expects(static::once())
            ->method('sync')
            ->willReturn($writeResult);

        $service = new SyncService(
            $writer,
            $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)
        );

        
Home | Imprint | This part of the site doesn't use cookies.