Fix the case-sensitivity of some HTTP class usage.

See #33413.


git-svn-id: https://develop.svn.wordpress.org/trunk@34123 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-09-14 17:36:37 +00:00
parent 811e538325
commit 2c91a4d1e0
5 changed files with 26 additions and 22 deletions
+5 -5
View File
@@ -16,12 +16,12 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
function setUp() {
if ( is_callable( array('WP_HTTP', '_getTransport') ) ) {
$this->markTestSkipped('The WP_HTTP tests require a class-http.php file of r17550 or later.');
if ( is_callable( array('WP_Http', '_getTransport') ) ) {
$this->markTestSkipped('The WP_Http tests require a class-http.php file of r17550 or later.');
return;
}
$class = "WP_HTTP_" . $this->transport;
$class = "WP_Http_" . $this->transport;
if ( !call_user_func( array($class, 'test') ) ) {
$this->markTestSkipped( sprintf('The transport %s is not supported on this system', $this->transport) );
}
@@ -184,7 +184,7 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
$size = 87348;
$res = wp_remote_request( $url, array( 'stream' => true, 'timeout' => 30 ) ); //Auto generate the filename.
// Cleanup before we assert, as it'll return early.
// Cleanup before we assert, as it'll return early.
if ( ! is_wp_error( $res ) ) {
$filesize = filesize( $res['filename'] );
unlink( $res['filename'] );
@@ -205,7 +205,7 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
$size = 10000;
$res = wp_remote_request( $url, array( 'stream' => true, 'timeout' => 30, 'limit_response_size' => $size ) ); //Auto generate the filename.
// Cleanup before we assert, as it'll return early.
// Cleanup before we assert, as it'll return early.
if ( ! is_wp_error( $res ) ) {
$filesize = filesize( $res['filename'] );
unlink( $res['filename'] );
+4 -4
View File
@@ -10,12 +10,12 @@ class Tests_HTTP_HTTP extends WP_UnitTestCase {
* @dataProvider make_absolute_url_testcases
*/
function test_make_absolute_url( $relative_url, $absolute_url, $expected ) {
if ( ! is_callable( array( 'WP_HTTP', 'make_absolute_url' ) ) ) {
if ( ! is_callable( array( 'WP_Http', 'make_absolute_url' ) ) ) {
$this->markTestSkipped( "This version of WP_HTTP doesn't support WP_HTTP::make_absolute_url()" );
return;
}
$actual = WP_HTTP::make_absolute_url( $relative_url, $absolute_url );
$actual = WP_Http::make_absolute_url( $relative_url, $absolute_url );
$this->assertEquals( $expected, $actual );
}
@@ -105,9 +105,9 @@ class Tests_HTTP_HTTP extends WP_UnitTestCase {
}
/**
* A Wrapper of WP_HTTP to make parse_url() publicaly accessible for testing purposes.
* A Wrapper of WP_Http to make parse_url() publicaly accessible for testing purposes.
*/
class WP_HTTP_Testable extends WP_HTTP {
class WP_HTTP_Testable extends WP_Http {
public static function parse_url( $url ) {
return parent::parse_url( $url );
}