You are here

public function RouterIndexOptimizationTest::testUpdate in Drupal 8

Ensures that the system_update_8002() runs as expected.

File

core/modules/system/tests/src/Functional/Update/RouterIndexOptimizationTest.php, line 32

Class

RouterIndexOptimizationTest
Tests system_update_8002().

Namespace

Drupal\Tests\system\Functional\Update

Code

public function testUpdate() {
  $this
    ->runUpdates();
  $database = $this->container
    ->get('database');

  // Removed index.
  $this
    ->assertFalse($database
    ->schema()
    ->indexExists('router', 'pattern_outline_fit'));

  // Added index.
  $this
    ->assertTrue($database
    ->schema()
    ->indexExists('router', 'pattern_outline_parts'));
}