function YamlCacheCollectorTest::setUp

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Utility/YamlCacheCollectorTest.php \Drupal\Tests\Core\Utility\YamlCacheCollectorTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Utility/YamlCacheCollectorTest.php, line 58

Class

YamlCacheCollectorTest
Tests Drupal\Core\Cache\CacheCollector.

Namespace

Drupal\Tests\Core\Utility

Code

protected function setUp() : void {
  parent::setUp();
  $this->time = new Time();
  $this->cacheBackend = new MemoryBackend($this->time);
  $this->lock = new NullLockBackend();
  $this->cid = 'test';
  $this->collector = new YamlCacheCollector($this->cid, $this->cacheBackend, $this->lock, $this->time);
}

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