MockPhpStorage.php in Drupal 10
Same filename and directory in other branches
Namespace
Drupal\system\PhpStorageFile
core/modules/system/src/PhpStorage/MockPhpStorage.phpView source
<?php
namespace Drupal\system\PhpStorage;
/**
* Mock PHP storage class used for testing.
*/
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;
}
}
Classes
Name | Description |
---|---|
MockPhpStorage | Mock PHP storage class used for testing. |