class HalSettingsDeletionUpdateTest
Ensures that update hook is run properly for deleting obsolete Hal settings.
@group hal
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \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\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\Update\UpdatePathTestBase uses \Drupal\Tests\UpdatePathTestTrait implements \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\hal\Functional\Update\HalSettingsDeletionUpdateTest implements \Drupal\FunctionalTests\Update\UpdatePathTestBase
- class \Drupal\FunctionalTests\Update\UpdatePathTestBase uses \Drupal\Tests\UpdatePathTestTrait implements \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of HalSettingsDeletionUpdateTest
File
-
core/
modules/ hal/ tests/ src/ Functional/ Update/ HalSettingsDeletionUpdateTest.php, line 12
Namespace
Drupal\Tests\hal\Functional\UpdateView source
class HalSettingsDeletionUpdateTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.8.0.filled.standard.php.gz',
];
}
/**
* Ensures that update hook is run for "hal" module.
*/
public function testUpdate() {
$hal_settings = $this->config('hal.settings');
$this->assertFalse($hal_settings->isNew());
$this->assertTrue($hal_settings->get('bc_file_uri_as_url_normalizer'));
$this->runUpdates();
$hal_settings = \Drupal::configFactory()->get('hal.settings');
$this->assertFalse($hal_settings->isNew());
$this->assertNull($hal_settings->get('bc_file_uri_as_url_normalizer'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.