You are here

public function FrontPageTest::testCacheTagsWithCachePluginTag in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/node/tests/src/Functional/Views/FrontPageTest.php \Drupal\Tests\node\Functional\Views\FrontPageTest::testCacheTagsWithCachePluginTag()
  2. 9 core/modules/node/tests/src/Functional/Views/FrontPageTest.php \Drupal\Tests\node\Functional\Views\FrontPageTest::testCacheTagsWithCachePluginTag()

Tests the cache tags when using the "tag" cache plugin.

File

core/modules/node/tests/src/Functional/Views/FrontPageTest.php, line 184

Class

FrontPageTest
Tests the default frontpage provided by views.

Namespace

Drupal\Tests\node\Functional\Views

Code

public function testCacheTagsWithCachePluginTag() {
  $this
    ->enablePageCaching();
  $view = Views::getView('frontpage');
  $view
    ->setDisplay('page_1');
  $view->display_handler
    ->overrideOption('cache', [
    'type' => 'tag',
  ]);
  $view
    ->save();
  $this
    ->doTestFrontPageViewCacheTags(TRUE);
}