You are here

public function RenderCacheIntegrationTest::testEntityBasedViewCacheTagsWithCachePluginTag in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Tests/RenderCacheIntegrationTest.php \Drupal\views\Tests\RenderCacheIntegrationTest::testEntityBasedViewCacheTagsWithCachePluginTag()

Tests a entity-based view's cache tags when using the "tag" cache plugin.

File

core/modules/views/src/Tests/RenderCacheIntegrationTest.php, line 217
Contains \Drupal\views\Tests\RenderCacheIntegrationTest.

Class

RenderCacheIntegrationTest
Tests the general integration between views and the render cache.

Namespace

Drupal\views\Tests

Code

public function testEntityBasedViewCacheTagsWithCachePluginTag() {
  $view = Views::getview('entity_test_row');
  $view
    ->getDisplay()
    ->overrideOption('cache', [
    'type' => 'tag',
  ]);
  $view
    ->save();
  $this
    ->assertCacheTagsForEntityBasedView(TRUE);
}