function FileCacheFactoryTest::testGetNoPrefix

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php \Drupal\Tests\Component\FileCache\FileCacheFactoryTest::testGetNoPrefix()
  2. 8.9.x core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php \Drupal\Tests\Component\FileCache\FileCacheFactoryTest::testGetNoPrefix()
  3. 11.x 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 62

Class

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

Namespace

Drupal\Tests\Component\FileCache

Code

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

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