diff --git a/tests/phpunit/tests/functions/getStatusHeaderDesc.php b/tests/phpunit/tests/functions/getStatusHeaderDesc.php index 1bcc6b4864669..54db712d79b07 100644 --- a/tests/phpunit/tests/functions/getStatusHeaderDesc.php +++ b/tests/phpunit/tests/functions/getStatusHeaderDesc.php @@ -41,4 +41,19 @@ public function data_get_status_header_desc() { array( 'random', '' ), ); } + + /** + * @ticket 35426 + */ + public function test_http_response_code_constants() { + global $wp_header_to_desc; + + $ref = new ReflectionClass( 'WP_Http' ); + $constants = $ref->getConstants(); + + // This primes the `$wp_header_to_desc` global: + get_status_header_desc( 200 ); + + $this->assertSame( array_keys( $wp_header_to_desc ), array_values( $constants ) ); + } } diff --git a/tests/phpunit/tests/http/http.php b/tests/phpunit/tests/http/http.php index 651064dc5674c..caba0c2e8db73 100644 --- a/tests/phpunit/tests/http/http.php +++ b/tests/phpunit/tests/http/http.php @@ -277,23 +277,6 @@ public function data_wp_parse_url_with_component() { ); } - /** - * @ticket 35426 - * - * @covers ::get_status_header_desc - */ - public function test_http_response_code_constants() { - global $wp_header_to_desc; - - $ref = new ReflectionClass( 'WP_Http' ); - $constants = $ref->getConstants(); - - // This primes the `$wp_header_to_desc` global: - get_status_header_desc( 200 ); - - $this->assertSame( array_keys( $wp_header_to_desc ), array_values( $constants ) ); - } - /** * @ticket 37768 *