.../modules/node/src/Tests/Views/FrontPageTest.php | 33 ++++++++++------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/core/modules/node/src/Tests/Views/FrontPageTest.php b/core/modules/node/src/Tests/Views/FrontPageTest.php index b28ef9c..7d2a544 100644 --- a/core/modules/node/src/Tests/Views/FrontPageTest.php +++ b/core/modules/node/src/Tests/Views/FrontPageTest.php @@ -233,10 +233,10 @@ public function testCacheTagsWithCachePluginTime() { /** * Tests the cache tags on the front page. * - * @param bool $assert_views_caches + * @param bool $do_assert_views_caches * Whether to check Views' result & output caches. */ - protected function assertFrontPageViewCacheTags($assert_views_caches) { + protected function assertFrontPageViewCacheTags($do_assert_views_caches) { $view = Views::getView('frontpage'); $view->setDisplay('page_1'); @@ -245,13 +245,12 @@ protected function assertFrontPageViewCacheTags($assert_views_caches) { 'config:views.view.frontpage', 'node_list', ]; - if ($assert_views_caches) { - $this->assertViewsCacheTags( - $view, - $empty_node_listing_cache_tags, - Cache::mergeTags($empty_node_listing_cache_tags, ['rendered']) - ); - } + $this->assertViewsCacheTags( + $view, + $empty_node_listing_cache_tags, + $do_assert_views_caches, + $empty_node_listing_cache_tags + ); $this->assertPageCacheTags( Url::fromRoute('view.frontpage.page_1'), Cache::mergeTags($empty_node_listing_cache_tags, ['rendered']) @@ -289,19 +288,17 @@ protected function assertFrontPageViewCacheTags($assert_views_caches) { 'node_view', 'user_view', 'user:0', - 'rendered', ]); $view->setDisplay('page_1'); - if ($assert_views_caches) { - $this->assertViewsCacheTags( - $view, - $first_page_result_cache_tags, - $first_page_output_cache_tags - ); - } + $this->assertViewsCacheTags( + $view, + $first_page_result_cache_tags, + $do_assert_views_caches, + $first_page_output_cache_tags + ); $this->assertPageCacheTags( Url::fromRoute('view.frontpage.page_1'), - $first_page_output_cache_tags + Cache::mergeTags($first_page_output_cache_tags, ['rendered']) ); // Second page.