function GenericCacheBackendUnitTestBase::setUp

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php \Drupal\KernelTests\Core\Cache\GenericCacheBackendUnitTestBase::setUp()
  2. 8.9.x core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php \Drupal\system\Tests\Cache\GenericCacheBackendUnitTestBase::setUp()
  3. 8.9.x core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php \Drupal\KernelTests\Core\Cache\GenericCacheBackendUnitTestBase::setUp()
  4. 11.x core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php \Drupal\KernelTests\Core\Cache\GenericCacheBackendUnitTestBase::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php, line 109

Class

GenericCacheBackendUnitTestBase
Tests any cache backend.

Namespace

Drupal\KernelTests\Core\Cache

Code

protected function setUp() : void {
    $this->cacheBackends = [];
    $this->defaultValue = $this->randomMachineName(10);
    parent::setUp();
    $this->setUpCacheBackend();
}

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