You are here

public function FileCacheFactoryTest::testGetSetConfiguration in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php \Drupal\Tests\Component\FileCache\FileCacheFactoryTest::testGetSetConfiguration()

@covers ::getConfiguration @covers ::setConfiguration

File

core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php, line 164

Class

FileCacheFactoryTest
@coversDefaultClass \Drupal\Component\FileCache\FileCacheFactory @group FileCache

Namespace

Drupal\Tests\Component\FileCache

Code

public function testGetSetConfiguration() {
  $configuration = FileCacheFactory::getConfiguration();
  $configuration['test_foo_bar'] = [
    'bar' => 'llama',
  ];
  FileCacheFactory::setConfiguration($configuration);
  $configuration = FileCacheFactory::getConfiguration();
  $this
    ->assertEquals([
    'bar' => 'llama',
  ], $configuration['test_foo_bar']);
}