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