Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / src / Functional / Update / RemoveResponseGzipFromSystemPerformanceConfigurationTest.php
1 <?php
2
3 namespace Drupal\Tests\system\Functional\Update;
4
5 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
6
7 /**
8  * Ensures that response.gzip is removed from system.performance configuration.
9  *
10  * @group Update
11  */
12 class RemoveResponseGzipFromSystemPerformanceConfigurationTest extends UpdatePathTestBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   protected function setDatabaseDumpFiles() {
18     $this->databaseDumpFiles = [
19       __DIR__ . '/../../../../tests/fixtures/update/drupal-8.bare.standard.php.gz',
20     ];
21   }
22
23   /**
24    * Ensures that response.gzip is removed from system.performance
25    * configuration.
26    */
27   public function testUpdate() {
28     \Drupal::configFactory()->getEditable('system.performance')
29       ->set('response.gzip', 1)
30       ->save();
31
32     $this->runUpdates();
33
34     $system_performance = \Drupal::config('system.performance')->get();
35     $this->assertFalse(isset($system_performance['response.gzip']), 'Configuration response.gzip has been removed from system.performance.');
36   }
37
38 }