function SettingsTest::testGetHashSaltEmpty

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Site/SettingsTest.php \Drupal\Tests\Core\Site\SettingsTest::testGetHashSaltEmpty()
  2. 8.9.x core/tests/Drupal/Tests/Core/Site/SettingsTest.php \Drupal\Tests\Core\Site\SettingsTest::testGetHashSaltEmpty()
  3. 11.x core/tests/Drupal/Tests/Core/Site/SettingsTest.php \Drupal\Tests\Core\Site\SettingsTest::testGetHashSaltEmpty()

Tests Settings::getHashSalt() with no hash salt value.

@covers ::getHashSalt

@dataProvider providerTestGetHashSaltEmpty

File

core/tests/Drupal/Tests/Core/Site/SettingsTest.php, line 92

Class

SettingsTest
@coversDefaultClass \Drupal\Core\Site\Settings @runTestsInSeparateProcesses @group Site

Namespace

Drupal\Tests\Core\Site

Code

public function testGetHashSaltEmpty(array $config) : void {
    // Re-create settings with no 'hash_salt' key.
    $settings = new Settings($config);
    $this->expectException(\RuntimeException::class);
    $settings->getHashSalt();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.