function CacheCollectorTest::setUpMockLockBackend
Reinitializes the lock backend as a mock object.
7 calls to CacheCollectorTest::setUpMockLockBackend()
- CacheCollectorTest::testUpdateCache in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php - Tests updating the cache after a set.
- CacheCollectorTest::testUpdateCacheDelete in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php - Tests updating the cache after a delete.
- CacheCollectorTest::testUpdateCacheInvalidatedConflict in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php - Tests updating the cache when there is a conflict after cache invalidation.
- CacheCollectorTest::testUpdateCacheLockFail in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php - Tests updating the cache when the lock acquire fails.
- CacheCollectorTest::testUpdateCacheMerge in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php - Tests a cache hit, then item updated by a different request.
File
-
core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php, line 71
Class
Namespace
Drupal\Tests\Core\CacheCode
protected function setUpMockLockBackend() : void {
$this->lock = $this->createMock(LockBackendInterface::class);
$reflection = new \ReflectionProperty($this->collector, 'lock');
$reflection->setValue($this->collector, $this->lock);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.