class MockPhpStorage
Same name and namespace in other branches
- 11.x core/modules/system/src/PhpStorage/MockPhpStorage.php \Drupal\system\PhpStorage\MockPhpStorage
- 10 core/modules/system/src/PhpStorage/MockPhpStorage.php \Drupal\system\PhpStorage\MockPhpStorage
- 8.9.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;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.