function PathAliasRevisionIndexesUpdatePathTest::testRunUpdates

Tests the update path for the path_alias_revision table indices.

File

core/modules/path_alias/tests/src/Functional/Update/PathAliasRevisionIndexesUpdatePathTest.php, line 28

Class

PathAliasRevisionIndexesUpdatePathTest
Tests the update path for the path_alias_revision table indices.

Namespace

Drupal\Tests\path_alias\Functional\Update

Code

public function testRunUpdates() : void {
    $schema = \Drupal::database()->schema();
    $this->assertFalse($schema->indexExists('path_alias_revision', 'path_alias_revision__alias_langcode_id_status'));
    $this->assertFalse($schema->indexExists('path_alias_revision', 'path_alias_revision__path_langcode_id_status'));
    $this->runUpdates();
    $this->assertTrue($schema->indexExists('path_alias_revision', 'path_alias_revision__alias_langcode_id_status'));
    $this->assertTrue($schema->indexExists('path_alias_revision', 'path_alias_revision__path_langcode_id_status'));
}

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