function CheckpointStorageTest::setUp

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Config/Checkpoint/CheckpointStorageTest.php, line 48

Class

CheckpointStorageTest
@coversDefaultClass \Drupal\Core\Config\Checkpoint\CheckpointStorage[[api-linebreak]] @group Config

Namespace

Drupal\Tests\Core\Config\Checkpoint

Code

protected function setUp() : void {
  parent::setUp();
  // Set up a memory storage we can manipulate to set fixtures.
  $this->memory = new MemoryStorage();
  $keyValueMemoryFactory = new KeyValueMemoryFactory();
  $state = new State($keyValueMemoryFactory, new NullBackend('test'), new NullLockBackend());
  $time = new Time();
  $checkpoints = new LinearHistory($state, $time);
  $this->storage = new CheckpointStorage($this->memory, $checkpoints, $keyValueMemoryFactory);
}

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