Skip to content

Commit

Permalink
Coding Standards: Use correct case for class name in WP_Http tests.
Browse files Browse the repository at this point in the history
Follow-up to [8516], [54968].

Props jrf.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56319 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jul 27, 2023
1 parent 12a0205 commit 8698238
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/phpunit/tests/http/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* You may also need `-d safe_mode_gid=1` to relax the safe_mode checks to allow
* inclusion of PEAR.
*
* The WP_HTTP tests require a class-http.php file of r17550 or later.
* The WP_Http tests require a class-http.php file of r17550 or later.
*/
abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
// You can use your own version of data/WPHTTP-testcase-redirection-script.php here.
Expand Down
12 changes: 6 additions & 6 deletions tests/phpunit/tests/http/http.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Non-transport-specific WP_HTTP Tests
* Non-transport-specific WP_Http Tests
*
* @group http
*/
Expand Down Expand Up @@ -581,17 +581,17 @@ public function callback_remove_safe_ports( $ports ) {
/**
* Test HTTP Redirects with multiple Location headers specified.
*
* Ensure the WP_HTTP::handle_redirects() method handles multiple Location headers
* Ensure the WP_Http::handle_redirects() method handles multiple Location headers
* and the HTTP request it makes uses the last Location header.
*
* @ticket 16890
* @ticket 57306
*
* @covers WP_HTTP::handle_redirects
* @covers WP_Http::handle_redirects
*/
public function test_multiple_location_headers() {
$pre_http_request_filter_has_run = false;
// Filter the response made by WP_HTTP::handle_redirects().
// Filter the response made by WP_Http::handle_redirects().
add_filter(
'pre_http_request',
function( $response, $parsed_args, $url ) use ( &$pre_http_request_filter_has_run ) {
Expand Down Expand Up @@ -634,7 +634,7 @@ function( $response, $parsed_args, $url ) use ( &$pre_http_request_filter_has_ru
),
);

// Test the tests: ensure multiple locations are passed to WP_HTTP::handle_redirects().
// Test the tests: ensure multiple locations are passed to WP_Http::handle_redirects().
$this->assertIsArray( $headers['location'], 'Location header is expected to be an array.' );
$this->assertCount( 2, $headers['location'], 'Location header is expected to contain two values.' );

Expand All @@ -645,7 +645,7 @@ function( $response, $parsed_args, $url ) use ( &$pre_http_request_filter_has_ru
'method' => 'GET',
);

$redirect_response = WP_HTTP::handle_redirects(
$redirect_response = WP_Http::handle_redirects(
'http://example.com/?multiple-location-headers=1',
$args,
array(
Expand Down

0 comments on commit 8698238

Please sign in to comment.