You are here

protected function KernelTestBase::config in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::config()
  2. 9 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::config()

Configuration accessor for tests. Returns non-overridden configuration.

Parameters

string $name: The configuration name.

Return value

\Drupal\Core\Config\Config The configuration object with original configuration data.

107 calls to KernelTestBase::config()
CommandsTest::testAttachedSettings in core/tests/Drupal/KernelTests/Core/Ajax/CommandsTest.php
Regression test: Settings command exists regardless of JS aggregation.
ConfigCRUDTest::testCRUD in core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
Tests CRUD operations.
ConfigCRUDTest::testDataTypes in core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
Tests data type handling.
ConfigCRUDTest::testNameValidation in core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
Tests the validation of configuration object names.
ConfigCRUDTest::testValueValidation in core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
Tests the validation of configuration object values.

... See full list

File

core/tests/Drupal/KernelTests/KernelTestBase.php, line 428

Class

KernelTestBase
Base class for functional integration tests.

Namespace

Drupal\KernelTests

Code

protected function config($name) {
  return $this->container
    ->get('config.factory')
    ->getEditable($name);
}