mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Coding Standards: Use correct case for class name in WP_Http tests.
Follow-up to [8516], [54968]. Props jrf. See #58831. git-svn-id: https://develop.svn.wordpress.org/trunk@56319 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
12a0205829
commit
8698238039
@ -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.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Non-transport-specific WP_HTTP Tests
|
||||
* Non-transport-specific WP_Http Tests
|
||||
*
|
||||
* @group http
|
||||
*/
|
||||
@ -581,17 +581,17 @@ class Tests_HTTP_HTTP extends WP_UnitTestCase {
|
||||
/**
|
||||
* 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 ) {
|
||||
@ -634,7 +634,7 @@ class Tests_HTTP_HTTP extends WP_UnitTestCase {
|
||||
),
|
||||
);
|
||||
|
||||
// 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.' );
|
||||
|
||||
@ -645,7 +645,7 @@ class Tests_HTTP_HTTP extends WP_UnitTestCase {
|
||||
'method' => 'GET',
|
||||
);
|
||||
|
||||
$redirect_response = WP_HTTP::handle_redirects(
|
||||
$redirect_response = WP_Http::handle_redirects(
|
||||
'http://example.com/?multiple-location-headers=1',
|
||||
$args,
|
||||
array(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user