Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / src / Functional / Update / RemoveResponseGzipFromSystemPerformanceConfigurationTest.php
diff --git a/web/core/modules/system/tests/src/Functional/Update/RemoveResponseGzipFromSystemPerformanceConfigurationTest.php b/web/core/modules/system/tests/src/Functional/Update/RemoveResponseGzipFromSystemPerformanceConfigurationTest.php
new file mode 100644 (file)
index 0000000..b2ccfe6
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+namespace Drupal\Tests\system\Functional\Update;
+
+use Drupal\FunctionalTests\Update\UpdatePathTestBase;
+
+/**
+ * Ensures that response.gzip is removed from system.performance configuration.
+ *
+ * @group Update
+ */
+class RemoveResponseGzipFromSystemPerformanceConfigurationTest extends UpdatePathTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setDatabaseDumpFiles() {
+    $this->databaseDumpFiles = [
+      __DIR__ . '/../../../../tests/fixtures/update/drupal-8.bare.standard.php.gz',
+    ];
+  }
+
+  /**
+   * Ensures that response.gzip is removed from system.performance
+   * configuration.
+   */
+  public function testUpdate() {
+    \Drupal::configFactory()->getEditable('system.performance')
+      ->set('response.gzip', 1)
+      ->save();
+
+    $this->runUpdates();
+
+    $system_performance = \Drupal::config('system.performance')->get();
+    $this->assertFalse(isset($system_performance['response.gzip']), 'Configuration response.gzip has been removed from system.performance.');
+  }
+
+}