Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/phpunit/tests/functions/getStatusHeaderDesc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
}
}
17 changes: 0 additions & 17 deletions tests/phpunit/tests/http/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
Loading