Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / src / Functional / Update / RouterIndexOptimizationTest.php
1 <?php
2
3 namespace Drupal\Tests\system\Functional\Update;
4
5 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
6
7 /**
8  * Tests system_update_8002().
9  *
10  * @group Update
11  */
12 class RouterIndexOptimizationTest extends UpdatePathTestBase {
13   /**
14    * {@inheritdoc}
15    */
16   protected function setDatabaseDumpFiles() {
17     $this->databaseDumpFiles = [
18       __DIR__ . '/../../../../tests/fixtures/update/drupal-8.bare.standard.php.gz',
19     ];
20   }
21
22   /**
23    * Ensures that the system_update_8002() runs as expected.
24    */
25   public function testUpdate() {
26     $this->runUpdates();
27     $database = $this->container->get('database');
28     // Removed index.
29     $this->assertFalse($database->schema()->indexExists(
30       'router', 'pattern_outline_fit'
31     ));
32     // Added index.
33     $this->assertTrue($database->schema()->indexExists(
34       'router', 'pattern_outline_parts'
35     ));
36   }
37
38 }