RemoveResponseGzipFromSystemPerformanceConfigurationTest.php in Drupal 8
File
core/modules/system/tests/src/Functional/Update/RemoveResponseGzipFromSystemPerformanceConfigurationTest.php
View source
<?php
namespace Drupal\Tests\system\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
class RemoveResponseGzipFromSystemPerformanceConfigurationTest extends UpdatePathTestBase {
protected $defaultTheme = 'stark';
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../tests/fixtures/update/drupal-8.bare.standard.php.gz',
];
}
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.');
}
}