...ctionsAndTasksConvertedIntoBlocksUpdateTest.php | 3 +-- core/modules/tracker/src/Tests/TrackerTest.php | 23 ++++++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/core/modules/system/src/Tests/Update/LocalActionsAndTasksConvertedIntoBlocksUpdateTest.php b/core/modules/system/src/Tests/Update/LocalActionsAndTasksConvertedIntoBlocksUpdateTest.php index 2c749e2..2a7c737 100644 --- a/core/modules/system/src/Tests/Update/LocalActionsAndTasksConvertedIntoBlocksUpdateTest.php +++ b/core/modules/system/src/Tests/Update/LocalActionsAndTasksConvertedIntoBlocksUpdateTest.php @@ -21,12 +21,11 @@ class LocalActionsAndTasksConvertedIntoBlocksUpdateTest extends UpdatePathTestBa /** * {@inheritdoc} */ - protected function setUp() { + public function setDatabaseDumpFiles() { $this->databaseDumpFiles = [ __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz', __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.local-actions-tasks-into-blocks-507488.php', ]; - parent::setUp(); } /** diff --git a/core/modules/tracker/src/Tests/TrackerTest.php b/core/modules/tracker/src/Tests/TrackerTest.php index b3f2566..d8da6e8 100644 --- a/core/modules/tracker/src/Tests/TrackerTest.php +++ b/core/modules/tracker/src/Tests/TrackerTest.php @@ -87,16 +87,20 @@ function testTrackerAll() { // Assert cache contexts, specifically the pager and node access contexts. $this->assertCacheContexts(['languages:language_interface', 'route.name', 'theme', 'url.query_args:' . MainContentViewSubscriber::WRAPPER_FORMAT, 'url.query_args.pagers:0', 'user.node_grants:view', 'user']); - // Assert cache tags for the visible node and node list cache tag. + // Assert cache tags for the action/tabs blocks, visible node, and node list + // cache tag. $expected_tags = Cache::mergeTags($published->getCacheTags(), $published->getOwner()->getCacheTags()); - $additional_tags = [ - 'node_list', - 'rendered', + $block_tags = [ 'block_view', 'config:block.block.page_actions_block', 'config:block.block.page_tabs_block', 'config:block_list', ]; + $expected_tags = Cache::mergeTags($expected_tags, $block_tags); + $additional_tags = [ + 'node_list', + 'rendered', + ]; $expected_tags = Cache::mergeTags($expected_tags, $additional_tags); $this->assertCacheTags($expected_tags); @@ -166,15 +170,18 @@ function testTrackerUser() { $expected_tags = Cache::mergeTags($my_published->getCacheTags(), $my_published->getOwner()->getCacheTags()); $expected_tags = Cache::mergeTags($expected_tags, $other_published_my_comment->getCacheTags()); $expected_tags = Cache::mergeTags($expected_tags, $other_published_my_comment->getOwner()->getCacheTags()); - $additional_cache_tags = [ - 'node_list', - 'rendered', + $block_tags = [ 'block_view', 'config:block.block.page_actions_block', 'config:block.block.page_tabs_block', 'config:block_list', ]; - $expected_tags = Cache::mergeTags($expected_tags, $additional_cache_tags); + $expected_tags = Cache::mergeTags($expected_tags, $block_tags); + $additional_tags = [ + 'node_list', + 'rendered', + ]; + $expected_tags = Cache::mergeTags($expected_tags, $additional_tags); $this->assertCacheTags($expected_tags); $this->assertCacheContexts(['languages:language_interface', 'route.name', 'theme', 'url.query_args:' . MainContentViewSubscriber::WRAPPER_FORMAT, 'url.query_args.pagers:0', 'user', 'user.node_grants:view']);