function BlockContentReusableIndexUpdatePathTest::testRunUpdates

Same name and namespace in other branches
  1. 10 core/modules/block_content/tests/src/Functional/Update/BlockContentReusableIndexUpdatePathTest.php \Drupal\Tests\block_content\Functional\Update\BlockContentReusableIndexUpdatePathTest::testRunUpdates()

Tests the upgrade path for Block Content reusable index.

File

core/modules/block_content/tests/src/Functional/Update/BlockContentReusableIndexUpdatePathTest.php, line 29

Class

BlockContentReusableIndexUpdatePathTest
Tests the upgrade path for Block Content reusable column index.

Namespace

Drupal\Tests\block_content\Functional\Update

Code

public function testRunUpdates() : void {
    $connection = Database::getConnection();
    $this->assertFalse($connection->schema()
        ->indexExists('block_content_field_data', 'block_content_field__reusable'), 'Block Content reusable index not yet added.');
    $this->runUpdates();
    $this->assertTrue($connection->schema()
        ->indexExists('block_content_field_data', 'block_content_field__reusable'), 'Block Content reusable index has been added.');
}

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