function ViewExecutableTest::setUpMockCacheManager
Reinitializes the cache manager as a mock object.
1 call to ViewExecutableTest::setUpMockCacheManager()
- ViewExecutableTest::testCacheIsIgnoredDuringPreview in core/
modules/ views/ tests/ src/ Unit/ ViewExecutableTest.php - Tests cache is ignored during preview.
File
-
core/
modules/ views/ tests/ src/ Unit/ ViewExecutableTest.php, line 177
Class
Namespace
Drupal\Tests\views\UnitCode
protected function setUpMockCacheManager() : void {
$this->cacheManager = $this->createMock(PluginManagerInterface::class);
\Drupal::getContainer()->set('plugin.manager.views.cache', $this->cacheManager);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.