function CacheCollectorTest::setUp
Same name and namespace in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php \Drupal\Tests\Core\Cache\CacheCollectorTest::setUp()
- 10 core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php \Drupal\Tests\Core\Cache\CacheCollectorTest::setUp()
- 11.x core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php \Drupal\Tests\Core\Cache\CacheCollectorTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php, line 52
Class
- CacheCollectorTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Cache%21CacheCollector.php/class/CacheCollector/9" title="Default implementation for CacheCollectorInterface." class="local">\Drupal\Core\Cache\CacheCollector</a> @group Cache
Namespace
Drupal\Tests\Core\CacheCode
protected function setUp() : void {
$this->cacheBackend = $this->createMock('Drupal\\Core\\Cache\\CacheBackendInterface');
$this->cacheTagsInvalidator = $this->createMock('Drupal\\Core\\Cache\\CacheTagsInvalidatorInterface');
$this->lock = $this->createMock('Drupal\\Core\\Lock\\LockBackendInterface');
$this->cid = $this->randomMachineName();
$this->collector = new CacheCollectorHelper($this->cid, $this->cacheBackend, $this->lock);
$this->getContainerWithCacheTagsInvalidator($this->cacheTagsInvalidator);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.