// Create a power user node.
Node::
create(['title' => 'z' .
$this->
randomMachineName(), 'uid' =>
$this->powerUser->
id(), 'type' => 'test'
])->
save();
} /**
* Tests complex field rewriting and uncacheable field handlers.
*/
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
);