diff --git a/tests/phpunit/tests/link/getThePostsNavigation.php b/tests/phpunit/tests/link/getThePostsNavigation.php
index 0cb39b07453ee..f3e1077e81015 100644
--- a/tests/phpunit/tests/link/getThePostsNavigation.php
+++ b/tests/phpunit/tests/link/getThePostsNavigation.php
@@ -1,13 +1,14 @@
set_permalink_structure( '' );
+ $this->go_to( home_url( '/' ) );
+
+ global $wp_query, $paged;
+
+ $paged = 2;
+ $wp_query = new WP_Query(
+ array(
+ 'post_type' => 'post',
+ 'posts_per_page' => 1,
+ 'paged' => $paged,
+ )
+ );
+
+ add_filter(
+ 'navigation_markup_template',
+ static function () {
+ return '';
+ }
+ );
+
+ $expected = '';
+
+ $this->expectOutputString( $expected );
+ the_posts_navigation(
+ array(
+ 'class' => 'echo-navigation',
+ 'screen_reader_text' => 'Echo Reader',
+ 'aria_label' => 'Echo ARIA',
+ )
+ );
+ }
}