class TestStorage
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php \Drupal\Tests\Core\Config\TestStorage
- 8.9.x core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php \Drupal\Tests\Core\Config\TestStorage
- 10 core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php \Drupal\Tests\Core\Config\TestStorage
Provides a test implementation of \Drupal\Core\Config\StorageInterface.
Hierarchy
- class \Drupal\Core\Config\MemoryStorage implements \Drupal\Core\Config\StorageInterface
- class \Drupal\Tests\Core\Config\TestStorage extends \Drupal\Core\Config\MemoryStorage
Expanded class hierarchy of TestStorage
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ StorageCopyTraitTest.php, line 174
Namespace
Drupal\Tests\Core\ConfigView source
class TestStorage extends MemoryStorage {
/**
* Provides a setter to bypass the array type hint on ::write().
*
* This method allows us to create invalid configurations. The method
* ::write() only allows values of the type array.
*/
public function setValue($name, $value) : void {
$this->config[$this->collection][$name] = $value;
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.