function FileStorageTest::setUp

Same name in this branch
  1. 8.x drupal/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php \Drupal\Tests\Component\PhpStorage\FileStorageTest::setUp()
  2. 8.x drupal/core/modules/config/lib/Drupal/config/Tests/Storage/FileStorageTest.php \Drupal\config\Tests\Storage\FileStorageTest::setUp()

Overrides \Drupal\Tests\UnitTestCase::setUp()

Overrides PhpStorageTestBase::setUp

File

drupal/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php, line 23
Definition of Drupal\Tests\Component\PhpStorage\FileStorageTest.

Class

FileStorageTest
Tests the simple file storage.

Namespace

Drupal\Tests\Component\PhpStorage

Code

function setUp() {
  global $conf;
  parent::setUp();
  $dir_path = sys_get_temp_dir() . '/php';
  $conf['php_storage']['simpletest'] = array(
    'class' => 'Drupal\\Component\\PhpStorage\\FileStorage',
    'directory' => $dir_path,
  );
  $conf['php_storage']['readonly'] = array(
    'class' => 'Drupal\\Component\\PhpStorage\\FileReadOnlyStorage',
    'directory' => $dir_path,
    // Let this read from the bin where the other instance is writing.
    'bin' => 'simpletest',
  );
}