You are here

public function FileCacheFactoryTest::testGetNoPrefix 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::testGetNoPrefix()

@covers ::get

File

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

Class

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

Namespace

Drupal\Tests\Component\FileCache

Code

public function testGetNoPrefix() {
  FileCacheFactory::setPrefix(NULL);
  $this
    ->expectException(\InvalidArgumentException::class);
  $this
    ->expectExceptionMessage('Required prefix configuration is missing');
  FileCacheFactory::get('test_foo_settings', []);
}