protected function FixtureBase::config in Lightning Core 8.4
Same name and namespace in other branches
- 8.5 tests/src/FixtureBase.php \Drupal\Tests\lightning_core\FixtureBase::config()
- 8.3 tests/src/FixtureBase.php \Drupal\Tests\lightning_core\FixtureBase::config()
Returns a config object and caches its data for automatic restoration.
Parameters
string $id: The name of the config object to return.
Return value
\Drupal\Core\Config\Config The editable config object.
See also
::tearDown()
File
- tests/
src/ FixtureBase.php, line 124
Class
- FixtureBase
- Base class for contexts which set up and tear down a complete test fixture.
Namespace
Drupal\Tests\lightning_coreCode
protected function config($id) {
/** @var \Drupal\Core\Config\Config $config */
$config = $this->container
->get('config.factory')
->getEditable($id);
if (empty($this->config[$id])) {
$this->config[$id] = $config
->getRawData();
}
return $config;
}