function RowRenderCacheTest::testAdvancedCaching
Same name in other branches
- 9 core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php \Drupal\Tests\views\Kernel\Plugin\RowRenderCacheTest::testAdvancedCaching()
- 10 core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php \Drupal\Tests\views\Kernel\Plugin\RowRenderCacheTest::testAdvancedCaching()
- 11.x core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php \Drupal\Tests\views\Kernel\Plugin\RowRenderCacheTest::testAdvancedCaching()
Test complex field rewriting and uncacheable field handlers.
File
-
core/
modules/ views/ tests/ src/ Kernel/ Plugin/ RowRenderCacheTest.php, line 86
Class
- RowRenderCacheTest
- Tests row render caching.
Namespace
Drupal\Tests\views\Kernel\PluginCode
public function testAdvancedCaching() {
// Test that row field output is actually cached and with the proper cache
// contexts.
$this->doTestRenderedOutput($this->editorUser);
$this->doTestRenderedOutput($this->editorUser, TRUE);
$this->doTestRenderedOutput($this->powerUser);
$this->doTestRenderedOutput($this->powerUser, TRUE);
$this->doTestRenderedOutput($this->regularUser);
$this->doTestRenderedOutput($this->regularUser, TRUE);
// Alter the result set order and check that counter is still working
// correctly.
$this->doTestRenderedOutput($this->editorUser);
/** @var \Drupal\node\NodeInterface $node */
$node = Node::load(6);
$node->setTitle('a' . $this->randomMachineName());
$node->save();
$this->doTestRenderedOutput($this->editorUser);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.