Migration1689084023AdminElasticsearchIndexTask example

protected function setUp(): void
    {
        parent::setUp();

        $this->connection = KernelLifecycleManager::getConnection();
        $this->rollback();
    }

    public function testMigration(): void
    {
        $migration = new Migration1689084023AdminElasticsearchIndexTask();
        $migration->update($this->connection);

        $schemaManager = $this->connection->createSchemaManager();
        $columns = $schemaManager->listTableColumns('admin_elasticsearch_index_task');

        static::assertNotEmpty($columns);
        static::assertArrayHasKey('id', $columns);
        static::assertArrayHasKey('`index`', $columns);
        static::assertArrayHasKey('alias', $columns);
        static::assertArrayHasKey('entity', $columns);
        static::assertArrayHasKey('doc_count', $columns);
    }
Home | Imprint | This part of the site doesn't use cookies.