public function FrontPageTest::testCacheTagsWithCachePluginTime in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/src/Tests/Views/FrontPageTest.php \Drupal\node\Tests\Views\FrontPageTest::testCacheTagsWithCachePluginTime()
Tests the cache tags when using the "time" cache plugin.
File
- core/
modules/ node/ src/ Tests/ Views/ FrontPageTest.php, line 216 - Contains \Drupal\node\Tests\Views\FrontPageTest.
Class
- FrontPageTest
- Tests the default frontpage provided by views.
Namespace
Drupal\node\Tests\ViewsCode
public function testCacheTagsWithCachePluginTime() {
$this
->enablePageCaching();
$view = Views::getView('frontpage');
$view
->setDisplay('page_1');
$view->display_handler
->overrideOption('cache', [
'type' => 'time',
'options' => [
'results_lifespan' => 3600,
'output_lifespan' => 3600,
],
]);
$view
->save();
$this
->doTestFrontPageViewCacheTags(TRUE);
}