function SettingsTest::setUp

Same name in this branch
  1. 8.9.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. 10 core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php \Drupal\Tests\migrate_drupal_ui\FunctionalJavascript\SettingsTest::setUp()
  5. 10 core/modules/views_ui/tests/src/Functional/SettingsTest.php \Drupal\Tests\views_ui\Functional\SettingsTest::setUp()
  6. 10 core/tests/Drupal/Tests/Core/Site/SettingsTest.php \Drupal\Tests\Core\Site\SettingsTest::setUp()
  7. 11.x core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php \Drupal\Tests\migrate_drupal_ui\FunctionalJavascript\SettingsTest::setUp()
  8. 11.x core/modules/views_ui/tests/src/Functional/SettingsTest.php \Drupal\Tests\views_ui\Functional\SettingsTest::setUp()
  9. 11.x 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 35

Class

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

Namespace

Drupal\Tests\Core\Site

Code

protected function 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.