function CacheCollectorTest::setUpMockCacheBackend
Reinitializes the cache backend as a mock object.
12 calls to CacheCollectorTest::setUpMockCacheBackend()
- CacheCollectorTest::testDelete in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php - Tests setting and deleting values.
- CacheCollectorTest::testGetFromCache in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php - Tests returning value from the collected cache.
- CacheCollectorTest::testSetAndGetNull in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php - Makes sure that NULL is a valid value and is collected.
- CacheCollectorTest::testUpdateCache in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php - Tests updating the cache after a set.
- CacheCollectorTest::testUpdateCacheClear in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php - Tests a clear of the cache collector.
File
-
core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php, line 62
Class
Namespace
Drupal\Tests\Core\CacheCode
protected function setUpMockCacheBackend() : void {
$this->cacheBackend = $this->createMock(CacheBackendInterface::class);
$reflection = new \ReflectionProperty($this->collector, 'cache');
$reflection->setValue($this->collector, $this->cacheBackend);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.