You are here

public function FileCacheFactoryTest::testGetSetPrefix in Drupal 8

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

@covers ::getPrefix @covers ::setPrefix

File

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

Class

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

Namespace

Drupal\Tests\Component\FileCache

Code

public function testGetSetPrefix() {

  // Random generator.
  $random = new Random();
  $prefix = $random
    ->name(8, TRUE);
  FileCacheFactory::setPrefix($prefix);
  $this
    ->assertEquals($prefix, FileCacheFactory::getPrefix());
}