class AssetCompressUpdatePathTest
Same name and namespace in other branches
- 11.x core/modules/system/tests/src/Functional/Update/AssetCompressUpdatePathTest.php \Drupal\Tests\system\Functional\Update\AssetCompressUpdatePathTest
Tests the upgrade path renaming system.performance gzip keys to compress.
Attributes
#[Group('Update')]
#[RunTestsInSeparateProcesses]
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Tests\DrupalTestCaseTrait, \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\Update\UpdatePathTestBase uses \Drupal\Tests\UpdatePathTestTrait extends \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\system\Functional\Update\AssetCompressUpdatePathTest extends \Drupal\FunctionalTests\Update\UpdatePathTestBase
- class \Drupal\FunctionalTests\Update\UpdatePathTestBase uses \Drupal\Tests\UpdatePathTestTrait extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of AssetCompressUpdatePathTest
File
-
core/
modules/ system/ tests/ src/ Functional/ Update/ AssetCompressUpdatePathTest.php, line 14
Namespace
Drupal\Tests\system\Functional\UpdateView source
class AssetCompressUpdatePathTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() : void {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-11.3.0.bare.standard.php.gz',
__DIR__ . '/../../../../tests/fixtures/update/install-mysqli.php',
];
}
/**
* Tests the upgrade path for renaming gzip keys to compress.
*/
public function testRunUpdates() : void {
$config = \Drupal::config('system.performance');
$this->assertIsBool($config->get('css.gzip'));
$this->assertIsBool($config->get('js.gzip'));
$this->runUpdates();
$config = \Drupal::config('system.performance');
$this->assertNull($config->get('css.gzip'));
$this->assertNull($config->get('js.gzip'));
$this->assertIsBool($config->get('css.compress'));
$this->assertIsBool($config->get('js.compress'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.