// Check that our call to action message is appealing to filibusters.
$this->
assertEquals('Draw yer cutlasses!',
$block->
label());
// Check that the cacheability metadata is correct.
$this->
assertEquals(['pirate_day'
],
$block->
getCacheContexts());
$this->
assertEquals(['config:block.block.call_to_action', 'pirate-day-tag'
],
$block->
getCacheTags());
$this->
assertEquals(PirateDayCacheContext::PIRATE_DAY_MAX_AGE,
$block->
getCacheMaxAge());
// Check that duplicating a config entity does not have the original config
// entity's cache tag.
$this->
assertEquals(['config:block.block.', 'pirate-day-tag'
],
$block->
createDuplicate()->
getCacheTags());
// Check that renaming a config entity does not have the original config
// entity's cache tag.
$block->
set('id', 'call_to_looting'
)->
save();
$this->
assertEquals(['pirate_day'
],
$block->
getCacheContexts());
$this->
assertEquals(['config:block.block.call_to_looting', 'pirate-day-tag'
],
$block->
getCacheTags());
$this->
assertEquals(PirateDayCacheContext::PIRATE_DAY_MAX_AGE,
$block->
getCacheMaxAge());
}}