function PhpStorageFactoryTest::setSettings
Same name in other branches
- 9 core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php \Drupal\Tests\system\Kernel\PhpStorage\PhpStorageFactoryTest::setSettings()
- 8.9.x core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php \Drupal\Tests\system\Kernel\PhpStorage\PhpStorageFactoryTest::setSettings()
- 10 core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php \Drupal\Tests\system\Kernel\PhpStorage\PhpStorageFactoryTest::setSettings()
Sets the Settings() singleton.
Parameters
string $name: The storage bin name to set.
array $configuration: An array of configuration to set. Will be merged with default values.
2 calls to PhpStorageFactoryTest::setSettings()
- PhpStorageFactoryTest::testGetDefault in core/
modules/ system/ tests/ src/ Kernel/ PhpStorage/ PhpStorageFactoryTest.php - Tests the get() method using the 'default' settings.
- PhpStorageFactoryTest::testGetOverride in core/
modules/ system/ tests/ src/ Kernel/ PhpStorage/ PhpStorageFactoryTest.php - Tests the get() method with overridden settings.
File
-
core/
modules/ system/ tests/ src/ Kernel/ PhpStorage/ PhpStorageFactoryTest.php, line 97
Class
- PhpStorageFactoryTest
- Tests the PHP storage factory.
Namespace
Drupal\Tests\system\Kernel\PhpStorageCode
protected function setSettings($name = 'default', array $configuration = []) : void {
$settings['php_storage'][$name] = $configuration + [
'class' => 'Drupal\\system\\PhpStorage\\MockPhpStorage',
'directory' => 'tmp://',
'secret' => $this->randomString(),
'bin' => 'test',
];
$settings['hash_salt'] = 'mock hash salt';
new Settings($settings);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.