IndexerQueuer example



    public function testMultipleEntriesAreMerged(): void
    {
        $connection = $this->getContainer()->get(Connection::class);

        IndexerQueuer::registerIndexer($connection, 'test.indexer', ['test1']);
        IndexerQueuer::registerIndexer($connection, 'test.indexer', ['test2']);
        IndexerQueuer::registerIndexer($connection, 'foo.indexer', []);
        IndexerQueuer::registerIndexer($connection, 'fooba.indexer', ['ba']);

        $all = (new IndexerQueuer($connection))->getIndexers();
        ksort($all);

        static::assertSame([
            'foo.indexer' => [],
            'fooba.indexer' => ['ba'],
            'test.indexer' => ['test1', 'test2'],
        ]$all);
    }

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