function SettingsTest::setUp

Same name in this branch
  1. 11.x core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php \Drupal\Tests\migrate_drupal_ui\FunctionalJavascript\SettingsTest::setUp()
  2. 11.x core/modules/views_ui/tests/src/Functional/SettingsTest.php \Drupal\Tests\views_ui\Functional\SettingsTest::setUp()
Same name in other branches
  1. 9 core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php \Drupal\Tests\migrate_drupal_ui\FunctionalJavascript\SettingsTest::setUp()
  2. 9 core/modules/views_ui/tests/src/Functional/SettingsTest.php \Drupal\Tests\views_ui\Functional\SettingsTest::setUp()
  3. 9 core/tests/Drupal/Tests/Core/Site/SettingsTest.php \Drupal\Tests\Core\Site\SettingsTest::setUp()
  4. 8.9.x core/modules/views_ui/tests/src/Functional/SettingsTest.php \Drupal\Tests\views_ui\Functional\SettingsTest::setUp()
  5. 8.9.x core/tests/Drupal/Tests/Core/Site/SettingsTest.php \Drupal\Tests\Core\Site\SettingsTest::setUp()
  6. 10 core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php \Drupal\Tests\migrate_drupal_ui\FunctionalJavascript\SettingsTest::setUp()
  7. 10 core/modules/views_ui/tests/src/Functional/SettingsTest.php \Drupal\Tests\views_ui\Functional\SettingsTest::setUp()
  8. 10 core/tests/Drupal/Tests/Core/Site/SettingsTest.php \Drupal\Tests\Core\Site\SettingsTest::setUp()

@covers ::__construct

Overrides UnitTestCase::setUp

File

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

Class

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

Namespace

Drupal\Tests\Core\Site

Code

protected function setUp() : void {
    parent::setUp();
    $this->config = [
        'one' => '1',
        'two' => '2',
        'hash_salt' => $this->randomMachineName(),
    ];
    $this->settings = new Settings($this->config);
}

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