diff --git a/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php b/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php index d025415..a4317a4 100644 --- a/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php +++ b/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php @@ -196,7 +196,7 @@ public function build() { /** * Generates the ordered array of node links for build(). * - * @param array $counts + * @param array $nids * An ordered array of node ids. * @param string $title * The title for the list. diff --git a/core/modules/statistics/src/Tests/StatisticsReportsTest.php b/core/modules/statistics/src/Tests/StatisticsReportsTest.php index 81510c9..a2dd1dd 100644 --- a/core/modules/statistics/src/Tests/StatisticsReportsTest.php +++ b/core/modules/statistics/src/Tests/StatisticsReportsTest.php @@ -54,12 +54,18 @@ function testPopularContentBlock() { $this->assertText('All time', 'Found the all time popular content.'); $this->assertText('Last viewed', 'Found the last viewed popular content.'); - $this->assertCacheTags(array_merge( - $node->getCacheTags(), - $block->getCacheTags(), - $this->blockingUser->getCacheTags(), - ['block_view', 'config:block_list', 'node_list', 'rendered', 'user_view'] - )); + $this->assertCacheTags( + Cache::mergeTags( + Cache::mergeTags( + Cache::mergeTags( + $node->getCacheTags(), + $block->getCacheTags() + ), + $this->blockingUser->getCacheTags() + ), + ['block_view', 'config:block_list', 'node_list', 'rendered', 'user_view'] + ) + ); $this->assertCacheContexts($node->getCacheContexts()); // Check if the node link is displayed.