function ViewsDataTest::setUpMockCacheBackend
Reinitializes the cache backend as a mock object.
19 calls to ViewsDataTest::setUpMockCacheBackend()
- ViewsDataTest::testCacheCallsWithoutWarmCacheAndGetAllTables in core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php - Tests the cache calls for all views data without a warm cache.
- ViewsDataTest::testCacheCallsWithoutWarmCacheAndGetMultipleTables in core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php - Tests the cache calls for multiple tables without warm caches.
- ViewsDataTest::testCacheCallsWithSameTableMultipleTimes in core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php - Tests the cache backend behavior with requesting the same table multiple.
- ViewsDataTest::testCacheCallsWithSameTableMultipleTimesAndWarmCache in core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php - Tests the cache calls for a single table and warm cache.
- ViewsDataTest::testCacheCallsWithWarmCacheAndDifferentTable in core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php - Tests the cache calls for a different table than the one in cache.
File
-
core/
modules/ views/ tests/ src/ Unit/ ViewsDataTest.php, line 75
Class
Namespace
Drupal\Tests\views\UnitCode
protected function setUpMockCacheBackend() : void {
$this->cacheBackend = $this->createMock(CacheBackendInterface::class);
$reflection = new \ReflectionProperty($this->viewsData, 'cacheBackend');
$reflection->setValue($this->viewsData, $this->cacheBackend);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.