$this->
drupalGet('activity'
);
$this->
assertSession()->
pageTextNotContains($unpublished->
label());
$this->
assertSession()->
pageTextContains($published->
label());
$this->
assertSession()->
linkExists('My recent content', 0, 'User tab shows up on the global tracker page.'
);
// Assert cache contexts, specifically the pager and node access contexts.
$this->
assertCacheContexts(['languages:language_interface', 'route', 'theme', 'url.query_args:' . MainContentViewSubscriber::WRAPPER_FORMAT, 'url.query_args.pagers:0', 'user.node_grants:view', 'user'
]);
// Assert cache tags for the action/tabs blocks, visible node, and node list
// cache tag.
$expected_tags = Cache::
mergeTags($published->
getCacheTags(),
$published->
getOwner()->
getCacheTags());
// Because the 'user.permissions' cache context is being optimized away.
$role_tags =
[];
foreach ($this->user->
getRoles() as $rid) { $role_tags[] = "config:user.role.
$rid";
} $expected_tags = Cache::
mergeTags($expected_tags,
$role_tags);
$block_tags =
[ 'block_view',
'local_task',
'config:block.block.page_actions_block',
'config:block.block.page_tabs_block',