From c07de6220fe7bf0f3fedfcb7a1e641898ceb4504 Mon Sep 17 00:00:00 2001 From: sect Date: Sat, 30 Nov 2024 16:26:26 +0900 Subject: [PATCH] test: fix unit test for pagination --- tests/FunctionTests.php | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/tests/FunctionTests.php b/tests/FunctionTests.php index 3743085..b0dc191 100644 --- a/tests/FunctionTests.php +++ b/tests/FunctionTests.php @@ -56,20 +56,49 @@ public function testPaginationOutput() { $current_page = 1; $total_pages = 5; $range = 2; + $nonce = wp_create_nonce( 'google_ss2db_pagination' ); // Expected output. $expected_output = ''; // Capture the output. $this->expectOutputString( $expected_output ); // Execute the pagination function. - google_ss2db_options_pagination( $current_page, $total_pages, $range ); + google_ss2db_options_pagination( $current_page, $total_pages, $range, $nonce ); } }