Updated Drupal to 8.6. This goes with the following updates because it's possible...
[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  * @group legacy
12  */
13 class RemoveResponseGzipFromSystemPerformanceConfigurationTest extends UpdatePathTestBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   protected function setDatabaseDumpFiles() {
19     $this->databaseDumpFiles = [
20       __DIR__ . '/../../../../tests/fixtures/update/drupal-8.bare.standard.php.gz',
21     ];
22   }
23
24   /**
25    * Ensures that response.gzip is removed from system.performance
26    * configuration.
27    */
28   public function testUpdate() {
29     \Drupal::configFactory()->getEditable('system.performance')
30       ->set('response.gzip', 1)
31       ->save();
32
33     $this->runUpdates();
34
35     $system_performance = \Drupal::config('system.performance')->get();
36     $this->assertFalse(isset($system_performance['response.gzip']), 'Configuration response.gzip has been removed from system.performance.');
37   }
38
39 }