function CheckpointStorageTest::testReadOperations

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Config/Checkpoint/CheckpointStorageTest.php \Drupal\Tests\Core\Config\Checkpoint\CheckpointStorageTest::testReadOperations()

Tests read operations.

@legacy-covers ::exists @legacy-covers ::read @legacy-covers ::readMultiple @legacy-covers ::listAll

Attributes

#[DataProvider('readMethodsProvider')]

File

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

Class

CheckpointStorageTest
Tests Drupal\Core\Config\Checkpoint\CheckpointStorage.

Namespace

Drupal\Tests\Core\Config\Checkpoint

Code

public function testReadOperations(string $method, array $arguments, array $fixture) : void {
  // Create a checkpoint so the checkpoint storage can be read from.
  $this->storage
    ->checkpoint('');
  $this->setRandomFixtureConfig($fixture);
  $expected = call_user_func_array([
    $this->memory,
    $method,
  ], $arguments);
  $actual = call_user_func_array([
    $this->storage,
    $method,
  ], $arguments);
  $this->assertEquals($expected, $actual);
}

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