function ReadOnlyStorageTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php \Drupal\Tests\Core\Config\ReadOnlyStorageTest::setUp()
  2. 8.9.x core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php \Drupal\Tests\Core\Config\ReadOnlyStorageTest::setUp()
  3. 11.x core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php \Drupal\Tests\Core\Config\ReadOnlyStorageTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php, line 39

Class

ReadOnlyStorageTest
@coversDefaultClass \Drupal\Core\Config\ReadOnlyStorage @group Config

Namespace

Drupal\Tests\Core\Config

Code

protected function setUp() : void {
    parent::setUp();
    // Set up a memory storage we can manipulate to set fixtures.
    $this->memory = new MemoryStorage();
    // Wrap the memory storage in the read-only storage to test it.
    $this->storage = new ReadOnlyStorage($this->memory);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.