You are here

public function TestStorage::setValue in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php \Drupal\Tests\Core\Config\TestStorage::setValue()
  2. 9 core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php \Drupal\Tests\Core\Config\TestStorage::setValue()

Provides a setter to bypass the array typehint on ::write().

This method allows us to create invalid configurations. The method ::write() only allows values of the type array.

File

core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php, line 181

Class

TestStorage
Provides a test implementation of \Drupal\Core\Config\StorageInterface.

Namespace

Drupal\Tests\Core\Config

Code

public function setValue($name, $value) {
  $this->config[$this->collection][$name] = $value;
}