AvailableStockMirrorSubscriber example

$this->createMock(ValidatorInterface::class),
            $this->createMock(EntityWriteGatewayInterface::class)
        );

        return $definition;
    }

    public function testBeforeWriteOnlyReactsToLiveVersions(): void
    {
        $context = Context::createDefaultContext()->createWithVersionId($this->ids->create('version'));

        $subscriber = new AvailableStockMirrorSubscriber();

        $definition = $this->getDefinition();

        $command = new UpdateCommand(
            $definition,
            ['stock' => 10],
            ['id' => $this->ids->getBytes('product-1')],
            new EntityExistence(
                ProductDefinition::ENTITY_NAME,
                ['id' => $this->ids->get('product-1')],
                true,
                
Home | Imprint | This part of the site doesn't use cookies.