You are here

public function SettingsTest::testGetHashSaltEmpty in Drupal 9

Same name and namespace in other branches
  1. 8 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 86

Class

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

Namespace

Drupal\Tests\Core\Site

Code

public function testGetHashSaltEmpty(array $config) {

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