From 0f08958bb89fe1b0168294db09d51093c72546a2 Mon Sep 17 00:00:00 2001 From: Shail Mehta Date: Fri, 23 Oct 2026 20:22:45 +0530 Subject: [PATCH] Tests: Make data providers in canonical.php static --- tests/phpunit/tests/canonical.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/tests/canonical.php b/tests/phpunit/tests/canonical.php index 727c35e780238..424194acfe758 100644 --- a/tests/phpunit/tests/canonical.php +++ b/tests/phpunit/tests/canonical.php @@ -68,7 +68,7 @@ public function test_canonical( $test_url, $expected, $ticket = 0, $expected_doi $this->assertCanonical( $test_url, $expected, $ticket, $expected_doing_it_wrong ); } - public function data_canonical() { + public static function data_canonical() { /* * Data format: * [0]: Test URL. @@ -345,7 +345,7 @@ public function test_redirect_guess_404_permalink_with_custom_statuses( $status_ * bool Whether the 404 link is expected to redirect * } */ - public function data_redirect_guess_404_permalink_with_custom_statuses() { + public static function data_redirect_guess_404_permalink_with_custom_statuses() { return array( 'public status' => array( 'status_args' => array( 'public' => true ), @@ -395,7 +395,7 @@ public function test_redirect_guess_404_permalink_post_types( $original_url, $ex * * @return array[] */ - public function data_redirect_guess_404_permalink_post_types() { + public static function data_redirect_guess_404_permalink_post_types() { return array( 'single string formatted post type' => array( 'original_url' => '/?name=sample-pag&post_type=page', @@ -673,7 +673,7 @@ public function test_canonical_attachment_page_redirect_with_option_disabled( $e * * @return array[] */ - public function data_canonical_attachment_page_redirect_with_option_disabled() { + public static function data_canonical_attachment_page_redirect_with_option_disabled() { return array( 'logged out user, no parent' => array( '%%attachment_url%%',