You are here

trait Bootstrap in AmazonS3 7.2

Same name in this branch
  1. 7.2 tests/DrupalAdapter/Bootstrap.php \Drupal\amazons3Test\DrupalAdapter\Bootstrap
  2. 7.2 src/DrupalAdapter/Bootstrap.php \Drupal\amazons3\DrupalAdapter\Bootstrap

Methods that map to includes/bootstrap.inc.

@class Bootstrap @package Drupal\amazons3\DrupalAdapter @codeCoverageIgnore

Hierarchy

  • trait \Drupal\amazons3Test\DrupalAdapter\Bootstrap
3 files declare their use of Bootstrap
CloudFrontClient.php in tests/Stub/CloudFrontClient.php
S3Client.php in tests/Stub/S3Client.php
StreamWrapperConfiguration.php in tests/Stub/StreamWrapperConfiguration.php

File

tests/DrupalAdapter/Bootstrap.php, line 12

Namespace

Drupal\amazons3Test\DrupalAdapter
View source
trait Bootstrap {
  protected static $variableData = array();
  public static function setVariableData(array $data) {
    static::$variableData = $data;
  }

  /**
   * Static version of variable_get() for testing.
   *
   * @param string $name
   * @param null $default
   * @return string
   */
  public static function variable_get($name, $default = NULL) {
    if (isset(static::$variableData[$name])) {
      return static::$variableData[$name];
    }
    if (isset($default)) {
      return $default;
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Bootstrap::$variableData protected static property
Bootstrap::setVariableData public static function
Bootstrap::variable_get public static function Static version of variable_get() for testing.