// Add cron to the default shortcut set, now the shortcut list cache tag
// is expected.
$this->
drupalGet('admin/config/system/cron'
);
$this->
clickLink('Add to Default shortcuts'
);
$expected_cache_tags[] = 'config:shortcut_set_list';
$this->
assertCacheTags($expected_cache_tags);
// Verify that users without the 'access shortcuts' permission can't see the
// shortcuts.
$this->
drupalLogin($this->
drupalCreateUser(['access toolbar'
]));
$this->
assertSession()->
linkNotExists('Shortcuts'
);
$this->
verifyDynamicPageCache($test_page_url, 'MISS'
);
$this->
verifyDynamicPageCache($test_page_url, 'HIT'
);
// Verify that users without the 'administer site configuration' permission
// can't see the cron shortcut but can see shortcuts toolbar tab.
$this->
drupalLogin($this->
drupalCreateUser([ 'access toolbar',
'access shortcuts',
]));
$this->
verifyDynamicPageCache($test_page_url, 'MISS'
);
$this->
verifyDynamicPageCache($test_page_url, 'HIT'
);
$this->
assertSession()->
linkExists('Shortcuts'
);