class MockPhpStorage
Same name in other branches
- 8.9.x core/modules/system/src/PhpStorage/MockPhpStorage.php \Drupal\system\PhpStorage\MockPhpStorage
- 10 core/modules/system/src/PhpStorage/MockPhpStorage.php \Drupal\system\PhpStorage\MockPhpStorage
- 11.x 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
* The storage 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 $this->configuration[$key] ?? NULL;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
MockPhpStorage::$configuration | protected | property | The storage configuration. |
MockPhpStorage::getConfiguration | public | function | Gets the configuration data. |
MockPhpStorage::getConfigurationValue | public | function | Gets a single configuration key. |
MockPhpStorage::__construct | public | function | Constructs a MockPhpStorage object. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.