Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
45
core/modules/system/src/PhpStorage/MockPhpStorage.php
Normal file
45
core/modules/system/src/PhpStorage/MockPhpStorage.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\system\PhpStorage\MockPhpStorage.
|
||||
*/
|
||||
|
||||
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
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in a new issue