diff --git a/tests/phpunit/tests/general/paginateLinks.php b/tests/phpunit/tests/general/paginateLinks.php index fb99e86e0f459..26dd000fac1c0 100644 --- a/tests/phpunit/tests/general/paginateLinks.php +++ b/tests/phpunit/tests/general/paginateLinks.php @@ -565,4 +565,19 @@ public static function data_query_strings(): array { 'multi query vars' => array( 'foo=bar&pen=pencil' ), ); } + + /** + * Tests that paginate_links() returns null when there is only one page. + * + * @ticket 66827 + */ + public function test_paginate_links_returns_null_for_a_single_page() { + $this->assertNull( + paginate_links( + array( + 'total' => '1', + ) + ) + ); + } }