CreateHalSettingsForLinkDomainUpdateTest.php in Drupal 8
File
core/modules/hal/tests/src/Functional/Update/CreateHalSettingsForLinkDomainUpdateTest.php
View source
<?php
namespace Drupal\Tests\hal\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
class CreateHalSettingsForLinkDomainUpdateTest extends UpdatePathTestBase {
public function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
__DIR__ . '/../../../fixtures/update/drupal-8.hal-hal_update_8301.php',
];
}
public function testHalSettingsCreated() {
$hal_settings = $this
->config('hal.settings');
$this
->assertIdentical([], $hal_settings
->getRawData());
$this
->runUpdates();
$hal_settings = \Drupal::configFactory()
->get('hal.settings');
$this
->assertTrue(array_key_exists('link_domain', $hal_settings
->getRawData()));
$this
->assertIdentical(NULL, $hal_settings
->getRawData()['link_domain']);
}
}