class MockPhpStorage in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/src/PhpStorage/MockPhpStorage.php \Drupal\system\PhpStorage\MockPhpStorage
Mock PHP storage class used for testing.
Hierarchy
- class \Drupal\system\PhpStorage\MockPhpStorage
Expanded class hierarchy of MockPhpStorage
1 file declares its use of MockPhpStorage
- PhpStorageFactoryTest.php in core/
modules/ system/ tests/ src/ Kernel/ PhpStorage/ PhpStorageFactoryTest.php
File
- core/
modules/ system/ src/ PhpStorage/ MockPhpStorage.php, line 8
Namespace
Drupal\system\PhpStorageView source
class MockPhpStorage {
/**
* The storage configuration.
*
* @var array
*/
protected $configuration;
/**
* Constructs a MockPhpStorage object.
*
* @param array $configuration
*/
public function __construct(array $configuration) {
$this->configuration = $configuration;
}
/**
* Gets the configuration data.
*/
public function getConfiguration() {
return $this->configuration;
}
/**
* Gets a single configuration key.
*/
public function getConfigurationValue($key) {
return isset($this->configuration[$key]) ? $this->configuration[$key] : NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MockPhpStorage:: |
protected | property | The storage configuration. | |
MockPhpStorage:: |
public | function | Gets the configuration data. | |
MockPhpStorage:: |
public | function | Gets a single configuration key. | |
MockPhpStorage:: |
public | function | Constructs a MockPhpStorage object. |