function FrontPageTest::testCacheTagsWithCachePluginTag

Same name and namespace in other branches
  1. 9 core/modules/node/tests/src/Functional/Views/FrontPageTest.php \Drupal\Tests\node\Functional\Views\FrontPageTest::testCacheTagsWithCachePluginTag()
  2. 8.9.x core/modules/node/tests/src/Functional/Views/FrontPageTest.php \Drupal\Tests\node\Functional\Views\FrontPageTest::testCacheTagsWithCachePluginTag()
  3. 10 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 188

Class

FrontPageTest
Tests the default frontpage provided by views.

Namespace

Drupal\Tests\node\Functional\Views

Code

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

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