3 namespace Drupal\Tests\hal\Functional\Update;
5 use Drupal\system\Tests\Update\UpdatePathTestBase;
8 * Tests that 'hal.settings' is created, to store 'link_domain'.
10 * @see https://www.drupal.org/node/2758897
14 class CreateHalSettingsForLinkDomainUpdateTest extends UpdatePathTestBase {
19 public function setDatabaseDumpFiles() {
20 $this->databaseDumpFiles = [
21 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
22 __DIR__ . '/../../../fixtures/update/drupal-8.hal-hal_update_8301.php',
27 * Tests hal_update_8301().
29 public function testHalSettingsCreated() {
30 // Make sure we have the expected values before the update.
31 $hal_settings = $this->config('hal.settings');
32 $this->assertIdentical([], $hal_settings->getRawData());
36 // Make sure we have the expected values after the update.
37 $hal_settings = \Drupal::configFactory()->get('hal.settings');
38 $this->assertTrue(array_key_exists('link_domain', $hal_settings->getRawData()));
39 $this->assertIdentical(NULL, $hal_settings->getRawData()['link_domain']);