public function testEntityCreation() { // Create a cache entry that is tagged with a shortcut set cache tag.
$cache_tags =
['config:shortcut.set.default'
];
\Drupal::
cache('render'
)->
set('foo', 'bar', CacheBackendInterface::CACHE_PERMANENT,
$cache_tags);
// Verify a cache hit.
$this->
verifyRenderCache('foo',
$cache_tags);
// Now create a shortcut entity in that shortcut set.
$this->
createEntity();
// Verify a cache miss.
$this->
assertFalse(\Drupal::
cache('render'
)->
get('foo'
), 'Creating a new shortcut invalidates the cache tag of the shortcut set.'
);
} /**
* Tests visibility and cacheability of shortcuts in the toolbar.
*/
public function testToolbar() { $this->
drupalPlaceBlock('page_title_block',
['id' => 'title'
]);