function TestStorage::setValue

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php \Drupal\Tests\Core\Config\TestStorage::setValue()
  2. 10 core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php \Drupal\Tests\Core\Config\TestStorage::setValue()
  3. 11.x 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;
}

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