diff --git a/tests/phpunit/tests/ai-client/wpAiClientHttpClient.php b/tests/phpunit/tests/ai-client/wpAiClientHttpClient.php index e58ddc62d06c3..f1b873fe95e3f 100644 --- a/tests/phpunit/tests/ai-client/wpAiClientHttpClient.php +++ b/tests/phpunit/tests/ai-client/wpAiClientHttpClient.php @@ -21,20 +21,6 @@ class Tests_AI_Client_HTTP_Client extends WP_UnitTestCase { */ private $psr17_factory; - /** - * Captured URL from the last intercepted HTTP request. - * - * @var string - */ - private $captured_url; - - /** - * Captured args from the last intercepted HTTP request. - * - * @var array - */ - private $captured_args; - /** * Sets up a fresh client instance before each test. */ diff --git a/tests/phpunit/tests/https-detection.php b/tests/phpunit/tests/https-detection.php index a425878ab114f..be2cc6ab84f65 100644 --- a/tests/phpunit/tests/https-detection.php +++ b/tests/phpunit/tests/https-detection.php @@ -5,8 +5,6 @@ */ class Tests_HTTPS_Detection extends WP_UnitTestCase { - private $last_request_url; - public function set_up() { parent::set_up(); @@ -136,75 +134,6 @@ public function test_wp_is_local_html_output_cannot_determine() { $this->assertNull( wp_is_local_html_output( $html ) ); } - public function record_request_url( $response, $parsed_args, $url ) { - $this->last_request_url = $url; - return $response; - } - - public function mock_success_with_sslverify( $response, $parsed_args ) { - if ( ! empty( $parsed_args['sslverify'] ) ) { - return $this->mock_success(); - } - return $response; - } - - public function mock_error_with_sslverify( $response, $parsed_args ) { - if ( ! empty( $parsed_args['sslverify'] ) ) { - return $this->mock_error(); - } - return $response; - } - - public function mock_success_without_sslverify( $response, $parsed_args ) { - if ( empty( $parsed_args['sslverify'] ) ) { - return $this->mock_success(); - } - return $response; - } - - public function mock_error_without_sslverify( $response, $parsed_args ) { - if ( empty( $parsed_args['sslverify'] ) ) { - return $this->mock_error(); - } - return $response; - } - - public function mock_not_found() { - return array( - 'body' => '404Not Found', - 'response' => array( - 'code' => 404, - 'message' => 'Not Found', - ), - ); - } - - public function mock_bad_source() { - // Looks like a success response, but is not generated by WordPress (e.g. missing RSD link). - return array( - 'body' => $this->get_sample_html_string(), - 'response' => array( - 'code' => 200, - 'message' => 'OK', - ), - ); - } - - private function mock_success() { - // Success response containing RSD link. - return array( - 'body' => $this->get_sample_html_string( get_echo( 'rsd_link' ) ), - 'response' => array( - 'code' => 200, - 'message' => 'OK', - ), - ); - } - - private function mock_error() { - return new WP_Error( 'bad_ssl_certificate', 'Bad SSL certificate.' ); - } - private function get_sample_html_string( $head_tag = '' ) { return 'Page Title' . $head_tag . 'Page Content.'; } diff --git a/tests/phpunit/tests/rest-api/rest-revisions-controller.php b/tests/phpunit/tests/rest-api/rest-revisions-controller.php index 71b333fa39fd4..af507907571bb 100644 --- a/tests/phpunit/tests/rest-api/rest-revisions-controller.php +++ b/tests/phpunit/tests/rest-api/rest-revisions-controller.php @@ -17,8 +17,6 @@ class WP_Test_REST_Revisions_Controller extends WP_Test_REST_Controller_Testcase private int $total_revisions; - private $revisions; - private WP_Post $revision_1; private int $revision_id1; private WP_Post $revision_2; @@ -93,7 +91,6 @@ public function set_up() { // Set first post revision vars. $revisions = wp_get_post_revisions( self::$post_id ); $this->total_revisions = count( $revisions ); - $this->revisions = $revisions; $this->revision_1 = array_pop( $revisions ); $this->revision_id1 = $this->revision_1->ID; $this->revision_2 = array_pop( $revisions ); diff --git a/tests/phpunit/tests/rewrite/numericSlugs.php b/tests/phpunit/tests/rewrite/numericSlugs.php index c174ce4875c4d..48b30f8729749 100644 --- a/tests/phpunit/tests/rewrite/numericSlugs.php +++ b/tests/phpunit/tests/rewrite/numericSlugs.php @@ -5,7 +5,6 @@ * @ticket 5305 */ class Tests_Rewrite_NumericSlugs extends WP_UnitTestCase { - private $old_current_user; private $author_id; public function set_up() { diff --git a/tests/phpunit/tests/theme/wpThemeJsonResolver.php b/tests/phpunit/tests/theme/wpThemeJsonResolver.php index ce5609a396f18..af443a2cc8b9d 100644 --- a/tests/phpunit/tests/theme/wpThemeJsonResolver.php +++ b/tests/phpunit/tests/theme/wpThemeJsonResolver.php @@ -61,11 +61,6 @@ class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase { */ private $orig_theme_dir; - /** - * @var array|null - */ - private $queries; - public static function set_up_before_class() { parent::set_up_before_class(); @@ -108,7 +103,6 @@ public function set_up() { add_filter( 'stylesheet_root', array( $this, 'filter_set_theme_root' ) ); add_filter( 'template_root', array( $this, 'filter_set_theme_root' ) ); add_filter( 'theme_file_uri', array( $this, 'filter_theme_file_uri' ) ); - $this->queries = array(); // Clear caches. wp_clean_themes_cache(); unset( $GLOBALS['wp_themes'] );