function ViewsDataTest::setUpMockChainedFastBackend

Reinitializes the chained fast cache backend as a mock object.

11 calls to ViewsDataTest::setUpMockChainedFastBackend()
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.
ViewsDataTest::testCacheCallsWithWarmCacheAndInvalidTable in core/modules/views/tests/src/Unit/ViewsDataTest.php
Tests the cache calls for a non-existent table.

... See full list

File

core/modules/views/tests/src/Unit/ViewsDataTest.php, line 92

Class

ViewsDataTest
Tests Drupal\views\ViewsData.

Namespace

Drupal\Tests\views\Unit

Code

protected function setUpMockChainedFastBackend() : void {
  $this->chainedFastBackend = $this->createMock(CacheBackendInterface::class);
  $reflection = new \ReflectionProperty($this->viewsData, 'chainedFastBackend');
  $reflection->setValue($this->viewsData, $this->chainedFastBackend);
}

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