function KernelTestBase::config

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::config()
  2. 8.9.x core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::config()
  3. 10 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.

91 calls to KernelTestBase::config()
BlockConfigSchemaTest::testBlockConfigSchema in core/modules/book/tests/src/Kernel/Block/BlockConfigSchemaTest.php
Tests the block config schema for block plugins.
BlockConfigSchemaTest::testBlockConfigSchema in core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php
Tests the block config schema for block plugins.
BookMultilingualTest::setUp in core/modules/book/tests/src/Kernel/BookMultilingualTest.php
BookPendingRevisionTest::testBookWithPendingRevisions in core/modules/book/tests/src/Kernel/BookPendingRevisionTest.php
Tests pending revision handling for books.
BookSettingsFormTest::testConfigValuesSavedCorrectly in core/modules/book/tests/src/Kernel/BookSettingsFormTest.php
Tests that submitted values are processed and saved correctly.

... See full list

File

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

Class

KernelTestBase
Base class for functional integration tests.

Namespace

Drupal\KernelTests

Code

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

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