You are here

public function RouterIndexOptimizationTest::testUpdate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Update/RouterIndexOptimizationTest.php \Drupal\system\Tests\Update\RouterIndexOptimizationTest::testUpdate()

Ensures that the system_update_8002() runs as expected.

File

core/modules/system/src/Tests/Update/RouterIndexOptimizationTest.php, line 27
Contains \Drupal\system\Tests\Update\RouterIndexOptimizationTest.

Class

RouterIndexOptimizationTest
Tests system_update_8002().

Namespace

Drupal\system\Tests\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'));
}