Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 6
MockPhpStorage
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 3
20
0.00% covered (danger)
0.00%
0 / 6
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
 getConfiguration
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
 getConfigurationValue
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 2
<?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;
  }
}