public function RenderCacheIntegrationTest::testEntityBasedViewCacheTagsWithCachePluginTag in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php \Drupal\Tests\views\Kernel\RenderCacheIntegrationTest::testEntityBasedViewCacheTagsWithCachePluginTag()
Tests an entity-based view's cache tags when using the "tag" cache plugin.
File
- core/
modules/ views/ tests/ src/ Kernel/ RenderCacheIntegrationTest.php, line 203
Class
- RenderCacheIntegrationTest
- Tests the general integration between views and the render cache.
Namespace
Drupal\Tests\views\KernelCode
public function testEntityBasedViewCacheTagsWithCachePluginTag() {
$view = Views::getview('entity_test_row');
$view
->getDisplay()
->overrideOption('cache', [
'type' => 'tag',
]);
$view
->save();
$this
->assertCacheTagsForEntityBasedView(TRUE);
}