class DropIndexAllOnKeyValueExpireTableUpdateTest

Tests that 'all' index is dropped from the 'key_value_expire' table.

@group Update

Hierarchy

Expanded class hierarchy of DropIndexAllOnKeyValueExpireTableUpdateTest

See also

system_post_update_remove_key_value_expire_all_index()

File

core/modules/system/tests/src/Functional/Update/DropIndexAllOnKeyValueExpireTableUpdateTest.php, line 13

Namespace

Drupal\Tests\system\Functional\Update
View source
class DropIndexAllOnKeyValueExpireTableUpdateTest extends UpdatePathTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected function setDatabaseDumpFiles() {
    $this->databaseDumpFiles = [
      dirname(__DIR__, 3) . '/fixtures/update/drupal-8.8.0.bare.standard.php.gz',
    ];
  }
  
  /**
   * Tests that 'all' index is dropped from the 'key_value_expire' table.
   */
  public function testUpdate() {
    $schema = \Drupal::database()->schema();
    $this->assertTrue($schema->indexExists('key_value_expire', 'all'));
    $this->runUpdates();
    $this->assertFalse($schema->indexExists('key_value_expire', 'all'));
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.