SystemUpdateListener example

/** * @internal * * @covers \Shopware\Elasticsearch\Framework\SystemUpdateListener */
class SystemUpdateListenerTest extends TestCase
{
    public function testShouldDoNothingWhenNotSet(): void
    {
        $messageBus = new CollectingMessageBus();

        $listener = new SystemUpdateListener(
            $this->createMock(AbstractKeyValueStorage::class),
            $this->createMock(ElasticsearchIndexer::class),
            $messageBus
        );

        $listener($this->createMock(UpdatePostFinishEvent::class));

        static::assertCount(0, $messageBus->getMessages());
    }

    public function testShouldScheduleWithValues(): void
    {
Home | Imprint | This part of the site doesn't use cookies.