onSalesChannelWritten example

$this->createMock(ElasticsearchRegistry::class),
            $this->createMock(Client::class),
            $this->createMock(ProductDefinition::class),
            $this->createMock(MessageBusInterface::class)
        );

        $event = $this->createMock(EntityWrittenEvent::class);
        $event
            ->expects(static::never())
            ->method('getWriteResults');

        $subscriber->onSalesChannelWritten($event);
    }

    public function testOnNewLanguageIndexGetsCreated(): void
    {
        Feature::skipTestIfActive('ES_MULTILINGUAL_INDEX', $this);

        $bus = new CollectingMessageBus();

        $elasticsearchHelper = $this->createMock(ElasticsearchHelper::class);
        $elasticsearchHelper->expects(static::once())->method('allowIndexing')->willReturn(true);

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