class TestStorage in Drupal 8
Same name and namespace in other branches
- 9 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 StorageInterface
- class \Drupal\Tests\Core\Config\TestStorage
Expanded class hierarchy of TestStorage
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ StorageCopyTraitTest.php, line 173
Namespace
Drupal\Tests\Core\ConfigView source
class TestStorage extends MemoryStorage {
/**
* 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.
*/
public function setValue($name, $value) {
$this->config[$this->collection][$name] = $value;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MemoryStorage:: |
protected | property | The storage collection. | |
MemoryStorage:: |
protected | property | The configuration, an object shared by reference across collections. | |
MemoryStorage:: |
public | function |
Creates a collection on the storage. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Decodes configuration data from the storage-specific format. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Deletes a configuration object from the storage. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Deletes configuration objects whose names start with a given prefix. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Encodes configuration data into the storage-specific format. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Returns whether a configuration object exists. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Gets the existing collections. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Gets the name of the current collection the storage is using. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Gets configuration object names starting with a given prefix. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Reads configuration data from the storage. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Reads configuration data from the storage. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Renames a configuration object in the storage. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function |
Writes configuration data to the storage. Overrides StorageInterface:: |
|
MemoryStorage:: |
public | function | Constructs a new MemoryStorage. | |
StorageInterface:: |
constant | The default collection name. | ||
TestStorage:: |
public | function | Provides a setter to bypass the array typehint on ::write(). |