Index: base.php
===================================================================
--- base.php	(revision 40341)
+++ base.php	(working copy)
@@ -10,398 +10,494 @@
  *
  * 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.
-	var $redirection_script = 'http://api.wordpress.org/core/tests/1.0/redirection.php';
-	var $fileStreamUrl = 'http://s.w.org/screenshots/3.9/dashboard.png';
+abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase
+{
+    
+    /**
+     * Redirection Script.
+     * You can use your own version of data/WPHTTP-testcase-redirection-script.php here.
+     * 
+     * (default value: 'http://api.wordpress.org/core/tests/1.0/redirection.php')
+     * 
+     * @var    string
+     * @access public
+     */
+    var $redirection_script = 'http://api.wordpress.org/core/tests/1.0/redirection.php';
+    
+    /**
+     * File Stream URL
+     * 
+     * (default value: 'http://s.w.org/screenshots/3.9/dashboard.png')
+     * 
+     * @var    string
+     * @access public
+     */
+    var $fileStreamUrl = 'http://s.w.org/screenshots/3.9/dashboard.png';
+    
+    /**
+     * HTTP Request Arguments.
+     * 
+     * @var    mixed
+     * @access protected
+     */
+    protected $http_request_args;
 
-	protected $http_request_args;
+    /**
+     * Mark test as skipped if the HTTP request times out.
+     * 
+     * @access public
+     * @param  mixed $response Response.
+     * @return void
+     */
+    function skipTestOnTimeout( $response ) 
+    {
+        if(! is_wp_error($response) ) {
+            return;
+        }
+        if ('connect() timed out!' === $response->get_error_message() ) {
+            $this->markTestSkipped('HTTP timeout');
+        }
 
-	/**
-	 * Mark test as skipped if the HTTP request times out
-	 */
-	function skipTestOnTimeout( $response ) {
-		if( ! is_wp_error( $response ) ){
-			return;
-		}
-		if ( 'connect() timed out!' === $response->get_error_message() ){
-			$this->markTestSkipped( 'HTTP timeout' );
-		}
+        if (0 === strpos($response->get_error_message(), 'Operation timed out after') ) {
+            $this->markTestSkipped('HTTP timeout');
+        }
 
-		if ( 0 === strpos( $response->get_error_message(), 'Operation timed out after' ) ){
-			$this->markTestSkipped( 'HTTP timeout' );
-		}
+        if (0 === strpos($response->get_error_message(), 'stream_socket_client(): unable to connect to tcp://s.w.org:80') ) {
+            $this->markTestSkipped('HTTP timeout');
+        }
 
-		if ( 0 === strpos( $response->get_error_message(), 'stream_socket_client(): unable to connect to tcp://s.w.org:80' ) ) {
-			$this->markTestSkipped( 'HTTP timeout' );
-		}
+    }
+    
+    /**
+     * Setup.
+     * 
+     * @access public
+     * @return void
+     */
+    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.');
+            return;
+        }
 
-	function setUp() {
+        $class = "WP_Http_" . ucfirst($this->transport);
+        if (!call_user_func(array($class, 'test')) ) {
+            $this->markTestSkipped(sprintf('The transport %s is not supported on this system', $this->transport));
+        }
 
-		if ( is_callable( array('WP_Http', '_getTransport') ) ) {
-			$this->markTestSkipped('The WP_Http tests require a class-http.php file of r17550 or later.');
-			return;
-		}
+        // Disable all transports aside from this one.
+        foreach ( array( 'curl', 'streams', 'fsockopen' ) as $t ) {
+            remove_filter("use_{$t}_transport", '__return_false'); // Just strip them all
+            if ($t != $this->transport ) {
+                add_filter("use_{$t}_transport", '__return_false'); // and add it back if need be..
+            }
+        }
+    }
+    
+    /**
+     * TearDown.
+     * 
+     * @access public
+     * @return void
+     */
+    function tearDown() 
+    {
+        foreach ( array( 'curl', 'streams', 'fsockopen' ) as $t ) {
+            remove_filter("use_{$t}_transport", '__return_false');
+        }
+        parent::tearDown();
+    }
+    
+    /**
+     * Filter HTTP Request Arguments.
+     * 
+     * @access public
+     * @param  array $args Arguments.
+     * @return void
+     */
+    function filter_http_request_args( array $args ) 
+    {
+        $this->http_request_args = $args;
+        return $args;
+    }
+    
+    /**
+     * Test Redirect on 301.
+     * 
+     * @access public
+     * @return void
+     */
+    function test_redirect_on_301() 
+    {
+        // 5 : 5 & 301
+        $res = wp_remote_request($this->redirection_script . '?code=301&rt=' . 5, array('redirection' => 5));
+        $this->assertNotWPError($res);
+        $this->assertEquals(200, (int)$res['response']['code']);
+    }
+    
+    /**
+     * Test Redirect on 302
+     * 
+     * @access public
+     * @return void
+     */
+    function test_redirect_on_302() 
+    {
+        // 5 : 5 & 302
+        $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 5));
+        $this->assertNotWPError($res);
+        $this->assertEquals(200, (int)$res['response']['code']);
+    }
 
-		$class = "WP_Http_" . ucfirst( $this->transport );
-		if ( !call_user_func( array($class, 'test') ) ) {
-			$this->markTestSkipped( sprintf('The transport %s is not supported on this system', $this->transport) );
-		}
+    /**
+     * Test Redirect 301 no Redirect.
+     * 
+     * @ticket 16855
+     * @access public
+     * @return void
+     */
+    function test_redirect_on_301_no_redirect() 
+    {
+        // 5 > 0 & 301
+        $res = wp_remote_request($this->redirection_script . '?code=301&rt=' . 5, array('redirection' => 0));
+        $this->assertNotWPError($res);
+        $this->assertEquals(301, (int)$res['response']['code']);
+    }
 
-		// Disable all transports aside from this one.
-		foreach ( array( 'curl', 'streams', 'fsockopen' ) as $t ) {
-			remove_filter( "use_{$t}_transport", '__return_false' ); // Just strip them all
-			if ( $t != $this->transport )
-				add_filter( "use_{$t}_transport", '__return_false' ); // and add it back if need be..
-		}
-	}
+    /**
+     * @ticket 16855
+     */
+    function test_redirect_on_302_no_redirect() 
+    {
+        // 5 > 0 & 302
+        $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0));
+        $this->assertNotWPError($res);
+        $this->assertEquals(302, (int)$res['response']['code']);
+    }
 
-	function tearDown() {
-		foreach ( array( 'curl', 'streams', 'fsockopen' ) as $t ) {
-			remove_filter( "use_{$t}_transport", '__return_false' );
-		}
-		parent::tearDown();
-	}
+    function test_redirections_equal() 
+    {
+        // 5 - 5
+        $res = wp_remote_request($this->redirection_script . '?rt=' . 5, array('redirection' => 5));
+        $this->assertNotWPError($res);
+        $this->assertEquals(200, (int)$res['response']['code']);
+    }
 
-	function filter_http_request_args( array $args ) {
-		$this->http_request_args = $args;
-		return $args;
-	}
+    function test_no_head_redirections() 
+    {
+        // No redirections on HEAD request:
+        $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 1, array('method' => 'HEAD'));
+        $this->assertNotWPError($res);
+        $this->assertEquals(302, (int)$res['response']['code']);
+    }
 
-	function test_redirect_on_301() {
-		// 5 : 5 & 301
-		$res = wp_remote_request($this->redirection_script . '?code=301&rt=' . 5, array('redirection' => 5) );
-		$this->assertNotWPError( $res );
-		$this->assertEquals(200, (int)$res['response']['code'] );
-	}
+    /**
+     * @ticket 16855
+     */
+    function test_redirect_on_head() 
+    {
+        // Redirections on HEAD request when Requested
+        $res = wp_remote_request($this->redirection_script . '?rt=' . 5, array('redirection' => 5, 'method' => 'HEAD'));
+        $this->assertNotWPError($res);
+        $this->assertEquals(200, (int)$res['response']['code']);
+    }
 
-	function test_redirect_on_302() {
-		// 5 : 5 & 302
-		$res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 5) );
-		$this->assertNotWPError( $res );
-		$this->assertEquals(200, (int)$res['response']['code'] );
-	}
+    function test_redirections_greater() 
+    {
+        // 10 > 5
+        $res = wp_remote_request($this->redirection_script . '?rt=' . 10, array('redirection' => 5));
+        $this->assertWPError($res);
+    }
 
-	/**
-	 * @ticket 16855
-	 */
-	function test_redirect_on_301_no_redirect() {
-		// 5 > 0 & 301
-		$res = wp_remote_request($this->redirection_script . '?code=301&rt=' . 5, array('redirection' => 0) );
-		$this->assertNotWPError( $res );
-		$this->assertEquals(301, (int)$res['response']['code'] );
-	}
+    function test_redirections_greater_edgecase() 
+    {
+        // 6 > 5 (close edgecase)
+        $res = wp_remote_request($this->redirection_script . '?rt=' . 6, array('redirection' => 5));
+        $this->assertWPError($res);
+    }
 
-	/**
-	 * @ticket 16855
-	 */
-	function test_redirect_on_302_no_redirect() {
-		// 5 > 0 & 302
-		$res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) );
-		$this->assertNotWPError( $res );
-		$this->assertEquals(302, (int)$res['response']['code'] );
-	}
+    function test_redirections_less_edgecase() 
+    {
+        // 4 < 5 (close edgecase)
+        $res = wp_remote_request($this->redirection_script . '?rt=' . 4, array('redirection' => 5));
+        $this->assertNotWPError($res);
+    }
 
-	function test_redirections_equal() {
-		// 5 - 5
-		$res = wp_remote_request($this->redirection_script . '?rt=' . 5, array('redirection' => 5) );
-		$this->assertNotWPError( $res );
-		$this->assertEquals(200, (int)$res['response']['code'] );
-	}
+    /**
+     * @ticket 16855
+     */
+    function test_redirections_zero_redirections_specified() 
+    {
+        // 0 redirections asked for, Should return the document?
+        $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0));
+        $this->assertNotWPError($res);
+        $this->assertEquals(302, (int)$res['response']['code']);
+    }
 
-	function test_no_head_redirections() {
-		// No redirections on HEAD request:
-		$res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 1, array('method' => 'HEAD') );
-		$this->assertNotWPError( $res );
-		$this->assertEquals( 302, (int)$res['response']['code'] );
-	}
+    /**
+     * Do not redirect on non 3xx status codes
+     *
+     * @ticket 16889
+     */
+    function test_location_header_on_201() 
+    {
+        // Prints PASS on initial load, FAIL if the client follows the specified redirection
+        $res = wp_remote_request($this->redirection_script . '?201-location=true');
+        $this->assertNotWPError($res);
+        $this->assertEquals('PASS', $res['body']);
+    }
 
-	/**
-	 * @ticket 16855
-	 */
-	function test_redirect_on_head() {
-		// Redirections on HEAD request when Requested
-		$res = wp_remote_request($this->redirection_script . '?rt=' . 5, array('redirection' => 5, 'method' => 'HEAD') );
-		$this->assertNotWPError( $res );
-		$this->assertEquals( 200, (int)$res['response']['code'] );
-	}
+    /**
+     * Test handling of PUT requests on redirects
+     *
+     * @ticket 16889
+     */
+    function test_no_redirection_on_PUT() 
+    {
+        $url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?201-location=1';
 
-	function test_redirections_greater() {
-		// 10 > 5
-		$res = wp_remote_request($this->redirection_script . '?rt=' . 10, array('redirection' => 5) );
-		$this->assertWPError( $res );
-	}
+        // Test 301 - POST to POST
+        $res = wp_remote_request($url, array( 'method' => 'PUT', 'timeout' => 30 ));
+        $this->assertEquals('PASS', wp_remote_retrieve_body($res));
+        $this->assertTrue(!empty($res['headers']['location']));
+    }
 
-	function test_redirections_greater_edgecase() {
-		// 6 > 5 (close edgecase)
-		$res = wp_remote_request($this->redirection_script . '?rt=' . 6, array('redirection' => 5) );
-		$this->assertWPError( $res );
-	}
+    /**
+     * @ticket 11888
+     */
+    function test_send_headers() 
+    {
+        // Test that the headers sent are recieved by the server
+        $headers = array('test1' => 'test', 'test2' => 0, 'test3' => '');
+        $res = wp_remote_request($this->redirection_script . '?header-check', array('headers' => $headers));
 
-	function test_redirections_less_edgecase() {
-		// 4 < 5 (close edgecase)
-		$res = wp_remote_request($this->redirection_script . '?rt=' . 4, array('redirection' => 5) );
-		$this->assertNotWPError( $res );
-	}
+        $this->assertNotWPError($res);
 
-	/**
-	 * @ticket 16855
-	 */
-	function test_redirections_zero_redirections_specified() {
-		// 0 redirections asked for, Should return the document?
-		$res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) );
-		$this->assertNotWPError( $res );
-		$this->assertEquals( 302, (int)$res['response']['code'] );
-	}
+        $headers = array();
+        foreach ( explode("\n", $res['body']) as $key => $value ) {
+            if (empty($value) ) {
+                continue;
+            }
+            $parts = explode(':', $value, 2);
+            unset($headers[$key]);
+            $headers[ $parts[0] ] = $parts[1];
+        }
 
-	/**
-	 * Do not redirect on non 3xx status codes
-	 *
-	 * @ticket 16889
-	 */
-	function test_location_header_on_201() {
-		// Prints PASS on initial load, FAIL if the client follows the specified redirection
-		$res = wp_remote_request( $this->redirection_script . '?201-location=true' );
-		$this->assertNotWPError( $res );
-		$this->assertEquals( 'PASS', $res['body']);
-	}
+        $this->assertTrue(isset($headers['test1']) && 'test' == $headers['test1']);
+        $this->assertTrue(isset($headers['test2']) && '0' === $headers['test2']);
+        // cURL/HTTP Extension Note: Will never pass, cURL does not pass headers with an empty value.
+        // Should it be that empty headers with empty values are NOT sent?
+        //$this->assertTrue( isset($headers['test3']) && '' === $headers['test3'] );
+    }
 
-	/**
-	 * Test handling of PUT requests on redirects
-	 *
-	 * @ticket 16889
-	 */
-	function test_no_redirection_on_PUT() {
-		$url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?201-location=1';
+    function test_file_stream() 
+    {
+        $url = $this->fileStreamUrl;
+        $size = 153204;
+        $res = wp_remote_request($url, array( 'stream' => true, 'timeout' => 30 )); //Auto generate the filename.
 
-		// Test 301 - POST to POST
-		$res = wp_remote_request( $url, array( 'method' => 'PUT', 'timeout' => 30 ) );
-		$this->assertEquals( 'PASS', wp_remote_retrieve_body( $res ) );
-		$this->assertTrue( !empty( $res['headers']['location'] ) );
-	}
+        // Cleanup before we assert, as it'll return early.
+        if (! is_wp_error($res) ) {
+            $filesize = filesize($res['filename']);
+            unlink($res['filename']);
+        }
 
-	/**
-	 * @ticket 11888
-	 */
-	function test_send_headers() {
-		// Test that the headers sent are recieved by the server
-		$headers = array('test1' => 'test', 'test2' => 0, 'test3' => '');
-		$res = wp_remote_request( $this->redirection_script . '?header-check', array('headers' => $headers) );
+        $this->skipTestOnTimeout($res);
 
-		$this->assertNotWPError( $res );
+        $this->assertNotWPError($res);
+        $this->assertEquals('', $res['body']); // The body should be empty.
+        $this->assertEquals($size, $res['headers']['content-length']); // Check the headers are returned (and the size is the same..)
+        $this->assertEquals($size, $filesize); // Check that the file is written to disk correctly without any extra characters
+        $this->assertStringStartsWith(get_temp_dir(), $res['filename']); // Check it's saving within the temp dir
+    }
 
-		$headers = array();
-		foreach ( explode("\n", $res['body']) as $key => $value ) {
-			if ( empty($value) )
-				continue;
-			$parts = explode(':', $value,2);
-			unset($headers[$key]);
-			$headers[ $parts[0] ] = $parts[1];
-		}
+    /**
+     * @ticket 26726
+     */
+    function test_file_stream_limited_size() 
+    {
+        $url = $this->fileStreamUrl;
+        $size = 10000;
+        $res = wp_remote_request($url, array( 'stream' => true, 'timeout' => 30, 'limit_response_size' => $size )); //Auto generate the filename.
 
-		$this->assertTrue( isset($headers['test1']) && 'test' == $headers['test1'] );
-		$this->assertTrue( isset($headers['test2']) && '0' === $headers['test2'] );
-		// cURL/HTTP Extension Note: Will never pass, cURL does not pass headers with an empty value.
-		// Should it be that empty headers with empty values are NOT sent?
-		//$this->assertTrue( isset($headers['test3']) && '' === $headers['test3'] );
-	}
+        // Cleanup before we assert, as it'll return early.
+        if (! is_wp_error($res) ) {
+            $filesize = filesize($res['filename']);
+            unlink($res['filename']);
+        }
 
-	function test_file_stream() {
-		$url = $this->fileStreamUrl;
-		$size = 153204;
-		$res = wp_remote_request( $url, array( 'stream' => true, 'timeout' => 30 ) ); //Auto generate the filename.
+        $this->skipTestOnTimeout($res);
 
-		// Cleanup before we assert, as it'll return early.
-		if ( ! is_wp_error( $res ) ) {
-			$filesize = filesize( $res['filename'] );
-			unlink( $res['filename'] );
-		}
+        $this->assertNotWPError($res);
+        $this->assertEquals($size, $filesize); // Check that the file is written to disk correctly without any extra characters
 
-		$this->skipTestOnTimeout( $res );
+    }
 
-		$this->assertNotWPError( $res );
-		$this->assertEquals( '', $res['body'] ); // The body should be empty.
-		$this->assertEquals( $size, $res['headers']['content-length'] ); // Check the headers are returned (and the size is the same..)
-		$this->assertEquals( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters
-		$this->assertStringStartsWith( get_temp_dir(), $res['filename'] ); // Check it's saving within the temp dir
-	}
+    /**
+     * Tests Limiting the response size when returning strings
+     *
+     * @ticket 31172
+     */
+    function test_request_limited_size() 
+    {
+        $url = $this->fileStreamUrl;
+        $size = 10000;
 
-	/**
-	 * @ticket 26726
-	 */
-	function test_file_stream_limited_size() {
-		$url = $this->fileStreamUrl;
-		$size = 10000;
-		$res = wp_remote_request( $url, array( 'stream' => true, 'timeout' => 30, 'limit_response_size' => $size ) ); //Auto generate the filename.
+        $res = wp_remote_request($url, array( 'timeout' => 30, 'limit_response_size' => $size ));
 
-		// Cleanup before we assert, as it'll return early.
-		if ( ! is_wp_error( $res ) ) {
-			$filesize = filesize( $res['filename'] );
-			unlink( $res['filename'] );
-		}
+        $this->skipTestOnTimeout($res);
 
-		$this->skipTestOnTimeout( $res );
+        $this->assertNotWPError($res);
+        $this->assertEquals($size, strlen($res['body']));
+    }
 
-		$this->assertNotWPError( $res );
-		$this->assertEquals( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters
+    /**
+     * Test POST redirection methods
+     *
+     * @dataProvider data_post_redirect_to_method_300
+     *
+     * @ticket 17588
+     */
+    function test_post_redirect_to_method_300( $response_code, $method ) 
+    {
+        $url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?post-redirect-to-method=1';
 
-	}
+        $res = wp_remote_post(add_query_arg('response_code', $response_code, $url), array( 'timeout' => 30 ));
+        $this->assertEquals($method, wp_remote_retrieve_body($res));
+    }
 
-	/**
-	 * Tests Limiting the response size when returning strings
-	 *
-	 * @ticket 31172
-	 */
-	function test_request_limited_size() {
-		$url = $this->fileStreamUrl;
-		$size = 10000;
+    public function data_post_redirect_to_method_300() 
+    {
+        return array(
+         // Test 300 - POST to POST
+         array(
+          300,
+          'POST',
+         ),
+         // Test 301 - POST to POST
+         array(
+          301,
+          'POST',
+         ),
+         // Test 302 - POST to GET
+         array(
+          302,
+          'GET',
+         ),
+         // Test 303 - POST to GET
+         array(
+          303,
+          'GET',
+         ),
+        );
+    }
 
-		$res = wp_remote_request( $url, array( 'timeout' => 30, 'limit_response_size' => $size ) );
+    /**
+     * Test HTTP Requests using an IP url, with a HOST header specified
+     *
+     * @ticket 24182
+     */
+    function test_ip_url_with_host_header() 
+    {
+        $ip = gethostbyname('api.wordpress.org');
+        $url = 'http://' . $ip . '/core/tests/1.0/redirection.php?print-pass=1';
+        $args = array(
+         'headers' => array(
+          'Host' => 'api.wordpress.org',
+         ),
+         'timeout' => 30,
+         'redirection' => 0,
+        );
 
-		$this->skipTestOnTimeout( $res );
+        $res = wp_remote_get($url, $args);
+        $this->assertEquals('PASS', wp_remote_retrieve_body($res));
 
-		$this->assertNotWPError( $res );
-		$this->assertEquals( $size, strlen( $res['body'] ) );
-	}
+    }
 
-	/**
-	 * Test POST redirection methods
-	 *
-	 * @dataProvider data_post_redirect_to_method_300
-	 *
-	 * @ticket 17588
-	 */
-	function test_post_redirect_to_method_300( $response_code, $method ) {
-		$url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?post-redirect-to-method=1';
+    /**
+     * Test HTTP requests where SSL verification is disabled but the CA bundle is still populated
+     *
+     * @ticket 33978
+     */
+    function test_https_url_without_ssl_verification() 
+    {
+        $url = 'https://wordpress.org/';
+        $args = array(
+         'sslverify' => false,
+        );
 
-		$res = wp_remote_post( add_query_arg( 'response_code', $response_code, $url ), array( 'timeout' => 30 ) );
-		$this->assertEquals( $method, wp_remote_retrieve_body( $res ) );
-	}
+        add_filter('http_request_args', array( $this, 'filter_http_request_args' ));
 
-	public function data_post_redirect_to_method_300() {
-		return array(
-			// Test 300 - POST to POST
-			array(
-				300,
-				'POST',
-			),
-			// Test 301 - POST to POST
-			array(
-				301,
-				'POST',
-			),
-			// Test 302 - POST to GET
-			array(
-				302,
-				'GET',
-			),
-			// Test 303 - POST to GET
-			array(
-				303,
-				'GET',
-			),
-		);
-	}
+        $res = wp_remote_head($url, $args);
 
-	/**
-	 * Test HTTP Requests using an IP url, with a HOST header specified
-	 *
-	 * @ticket 24182
-	 */
-	function test_ip_url_with_host_header() {
-		$ip = gethostbyname( 'api.wordpress.org' );
-		$url = 'http://' . $ip . '/core/tests/1.0/redirection.php?print-pass=1';
-		$args = array(
-			'headers' => array(
-				'Host' => 'api.wordpress.org',
-			),
-			'timeout' => 30,
-			'redirection' => 0,
-		);
+        remove_filter('http_request_args', array( $this, 'filter_http_request_args' ));
 
-		$res = wp_remote_get( $url, $args );
-		$this->assertEquals( 'PASS', wp_remote_retrieve_body( $res ) );
+        $this->assertNotEmpty($this->http_request_args['sslcertificates']);
+        $this->assertNotWPError($res);
+    }
 
-	}
+    /**
+     * Test HTTP Redirects with multiple Location headers specified
+     *
+     * @ticket 16890
+     */
+    function test_multiple_location_headers() 
+    {
+        $url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1';
+        $res = wp_remote_head($url, array( 'timeout' => 30 ));
 
-	/**
-	 * Test HTTP requests where SSL verification is disabled but the CA bundle is still populated
-	 *
-	 * @ticket 33978
-	 */
-	function test_https_url_without_ssl_verification() {
-		$url = 'https://wordpress.org/';
-		$args = array(
-			'sslverify' => false,
-		);
+        $this->assertInternalType('array', wp_remote_retrieve_header($res, 'location'));
+        $this->assertCount(2, wp_remote_retrieve_header($res, 'location'));
 
-		add_filter( 'http_request_args', array( $this, 'filter_http_request_args' ) );
+        $res = wp_remote_get($url, array( 'timeout' => 30 ));
+        $this->assertEquals('PASS', wp_remote_retrieve_body($res));
 
-		$res = wp_remote_head( $url, $args );
+    }
 
-		remove_filter( 'http_request_args', array( $this, 'filter_http_request_args' ) );
+    /**
+     * Test HTTP Cookie handling
+     *
+     * @ticket 21182
+     */
+    function test_cookie_handling() 
+    {
+        $url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?cookie-test=1';
 
-		$this->assertNotEmpty( $this->http_request_args['sslcertificates'] );
-		$this->assertNotWPError( $res );
-	}
+        $res = wp_remote_get($url);
+        $this->assertEquals('PASS', wp_remote_retrieve_body($res));
+    }
 
-	/**
-	 * Test HTTP Redirects with multiple Location headers specified
-	 *
-	 * @ticket 16890
-	 */
-	function test_multiple_location_headers() {
-		$url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1';
-		$res = wp_remote_head( $url, array( 'timeout' => 30 ) );
+    /**
+     * Test if HTTPS support works
+     *
+     * @group  ssl
+     * @ticket 25007
+     */
+    function test_ssl() 
+    {
+        if (! wp_http_supports(array( 'ssl' )) ) {
+            $this->markTestSkipped('This install of PHP does not support SSL');
+        }
 
-		$this->assertInternalType( 'array', wp_remote_retrieve_header( $res, 'location' ) );
-		$this->assertCount( 2, wp_remote_retrieve_header( $res, 'location' ) );
+        $res = wp_remote_get('https://wordpress.org/');
+        $this->assertNotWPError($res);
+    }
 
-		$res = wp_remote_get( $url, array( 'timeout' => 30 ) );
-		$this->assertEquals( 'PASS', wp_remote_retrieve_body( $res ) );
+    /**
+     * @ticket 37733
+     */
+    function test_url_with_double_slashes_path() 
+    {
+        $url = $this->redirection_script . '?rt=' . 0;
 
-	}
+        $path = parse_url($url, PHP_URL_PATH);
+        $url = str_replace($path, '/' . $path, $url);
 
-	/**
-	 * Test HTTP Cookie handling
-	 *
-	 * @ticket 21182
-	 */
-	function test_cookie_handling() {
-		$url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?cookie-test=1';
+        $res = wp_remote_request($url);
+        $this->assertNotWPError($res);
+    }
 
-		$res = wp_remote_get( $url );
-		$this->assertEquals( 'PASS', wp_remote_retrieve_body( $res ) );
-	}
 
-	/**
-	 * Test if HTTPS support works
-	 *
-	 * @group ssl
-	 * @ticket 25007
-	 */
-	function test_ssl() {
-		if ( ! wp_http_supports( array( 'ssl' ) ) )
-			$this->markTestSkipped( 'This install of PHP does not support SSL' );
-
-		$res = wp_remote_get( 'https://wordpress.org/' );
-		$this->assertNotWPError( $res );
-	}
-
-	/**
-	 * @ticket 37733
-	 */
-	function test_url_with_double_slashes_path() {
-		$url = $this->redirection_script . '?rt=' . 0;
-
-		$path = parse_url( $url, PHP_URL_PATH );
-		$url = str_replace( $path, '/' . $path, $url );
-
-		$res = wp_remote_request( $url );
-		$this->assertNotWPError( $res );
-	}
-
-
 }
Index: curl.php
===================================================================
--- curl.php	(revision 40341)
+++ curl.php	(working copy)
@@ -1,26 +1,54 @@
 <?php
 
-require_once dirname( __FILE__ ) . '/base.php';
+require_once dirname(__FILE__) . '/base.php';
 
 /**
- * @group http
- * @group external-http
+ * Tests HTTP Curl
+ * 
+ * @group   http
+ * @group   external-http
+ * @extends WP_HTTP_UnitTestCase
  */
-class Tests_HTTP_curl extends WP_HTTP_UnitTestCase {
-	var $transport = 'curl';
+class Tests_HTTP_curl extends WP_HTTP_UnitTestCase
+{
+    
+    /**
+     * transport
+     * 
+     * (default value: 'curl')
+     * 
+     * @var    string
+     * @access public
+     */
+    var $transport = 'curl';
 
-	/**
-	 * @ticket 39783
-	 */
-	public function test_http_api_curl_stream_parameter_is_a_reference() {
-		add_action( 'http_api_curl', array( $this, '_action_test_http_api_curl_stream_parameter_is_a_reference' ), 10, 3 );
-		wp_remote_request( $this->fileStreamUrl, array( 'stream' => true, 'timeout' => 30 ) );
-		remove_action( 'http_api_curl', array( $this, '_action_test_http_api_curl_stream_parameter_is_a_reference' ), 10 );
-	}
-
-	public function _action_test_http_api_curl_stream_parameter_is_a_reference( &$stream, $r, $url ) {
-		// $stream not being a reference will cause a PHP warning.
-		// For counting tests purposes, let's do a fake assert.
-		$this->assertTrue( true );
-	}
+    /**
+     * Test HTTP API Curl Stream Paramater is a Reference.
+     * 
+     * @ticket 39783
+     * @access public
+     * @return void
+     */
+    public function test_http_api_curl_stream_parameter_is_a_reference() 
+    {
+        add_action('http_api_curl', array( $this, '_action_test_http_api_curl_stream_parameter_is_a_reference' ), 10, 3);
+        wp_remote_request($this->fileStreamUrl, array( 'stream' => true, 'timeout' => 30 ));
+        remove_action('http_api_curl', array( $this, '_action_test_http_api_curl_stream_parameter_is_a_reference' ), 10);
+    }
+    
+    /**
+     * Test HTTP API Curl Stream Parameter is a Reference.
+     * 
+     * @access public
+     * @param  mixed &$stream Stream.
+     * @param  mixed $r       Reference.
+     * @param  mixed $url     URL.
+     * @return void
+     */
+    public function _action_test_http_api_curl_stream_parameter_is_a_reference( &$stream, $r, $url ) 
+    {
+        // $stream not being a reference will cause a PHP warning.
+        // For counting tests purposes, let's do a fake assert.
+        $this->assertTrue(true);
+    }
 }
Index: functions.php
===================================================================
--- functions.php	(revision 40341)
+++ functions.php	(working copy)
@@ -4,143 +4,214 @@
  * @group http
  * @group external-http
  */
-class Tests_HTTP_Functions extends WP_UnitTestCase {
-	public function setUp() {
-		if ( ! extension_loaded( 'openssl' ) ) {
-			$this->markTestSkipped( 'Tests_HTTP_Functions requires openssl.' );
-		}
+class Tests_HTTP_Functions extends WP_UnitTestCase
+{
+    
+    
+    /**
+     * Setup.
+     * 
+     * @access public
+     * @return void
+     */
+    public function setUp() 
+    {
+        if (! extension_loaded('openssl') ) {
+            $this->markTestSkipped('Tests_HTTP_Functions requires openssl.');
+        }
 
-		parent::setUp();
-	}
+        parent::setUp();
+    }
+    
+    /**
+     * Test head Request.
+     * 
+     * @access public
+     * @return void
+     */
+    function test_head_request() 
+    {
+        // This url give a direct 200 response.
+        $url = 'https://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg';
+        $response = wp_remote_head($url);
+        $headers = wp_remote_retrieve_headers($response);
 
-	function test_head_request() {
-		// this url give a direct 200 response
-		$url = 'https://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg';
-		$response = wp_remote_head( $url );
-		$headers = wp_remote_retrieve_headers( $response );
+        $this->assertInternalType('array', $response);
+        
+        $this->assertEquals('image/jpeg', $headers['content-type']);
+        $this->assertEquals('40148', $headers['content-length']);
+        $this->assertEquals('200', wp_remote_retrieve_response_code($response));
+    }
+    
+    /**
+     * Test Head Redirect.
+     * 
+     * @access public
+     * @return void
+     */
+    function test_head_redirect() 
+    {
+        // This url will 301 redirect.
+        $url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg';
+        $response = wp_remote_head($url);
+        $this->assertEquals('301', wp_remote_retrieve_response_code($response));
+    }
+    
+    /**
+     * Test Head 404.
+     * 
+     * @access public
+     * @return void
+     */
+    function test_head_404() 
+    {
+        $url = 'https://asdftestblog1.files.wordpress.com/2007/09/awefasdfawef.jpg';
+        $headers = wp_remote_head($url);
 
-		$this->assertInternalType( 'array', $response );
-		
-		$this->assertEquals( 'image/jpeg', $headers['content-type'] );
-		$this->assertEquals( '40148', $headers['content-length'] );
-		$this->assertEquals( '200', wp_remote_retrieve_response_code( $response ) );
-	}
+        $this->assertEquals('404', wp_remote_retrieve_response_code($headers));
+    }
+    
+    /**
+     * Test Get Request.
+     * 
+     * @access public
+     * @return void
+     */
+    function test_get_request() 
+    {
+        $url = 'https://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg';
 
-	function test_head_redirect() {
-		// this url will 301 redirect
-		$url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg';
-		$response = wp_remote_head( $url );
-		$this->assertEquals( '301', wp_remote_retrieve_response_code( $response ) );
-	}
+        $response = wp_remote_get($url);
+        $headers = wp_remote_retrieve_headers($response);
 
-	function test_head_404() {
-		$url = 'https://asdftestblog1.files.wordpress.com/2007/09/awefasdfawef.jpg';
-		$headers = wp_remote_head( $url );
+        $this->assertInternalType('array', $response);
+    
+        // Should return the same headers as a head request.
+        $this->assertEquals('image/jpeg', $headers['content-type']);
+        $this->assertEquals('40148', $headers['content-length']);
+        $this->assertEquals('200', wp_remote_retrieve_response_code($response));
+    }
+    
+    /**
+     * Test Get Redirect.
+     * 
+     * @access public
+     * @return void
+     */
+    function test_get_redirect() 
+    {
+        // This will redirect to asdftestblog1.files.wordpress.com
+        $url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg';
 
-		$this->assertEquals( '404', wp_remote_retrieve_response_code( $headers ) );
-	}
+        $response = wp_remote_get($url);
+        $headers = wp_remote_retrieve_headers($response);
 
-	function test_get_request() {
-		$url = 'https://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg';
+        // Should return the same headers as a head request.
+        $this->assertEquals('image/jpeg', $headers['content-type']);
+        $this->assertEquals('40148', $headers['content-length']);
+        $this->assertEquals('200', wp_remote_retrieve_response_code($response));
+    }
+    
+    /**
+     * Test Get Redirect Limit Exceeded
+     * 
+     * @access public
+     * @return void
+     */
+    function test_get_redirect_limit_exceeded() 
+    {
+        // This will redirect to asdftestblog1.files.wordpress.com 
+        $url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg';
 
-		$response = wp_remote_get( $url );
-		$headers = wp_remote_retrieve_headers( $response );
+        // Pretend we've already redirected 5 times.
+        $response = wp_remote_get($url, array( 'redirection' => -1 ));
+        $this->assertWPError($response);
+    }
 
-		$this->assertInternalType( 'array', $response );
-	
-		// should return the same headers as a head request
-		$this->assertEquals( 'image/jpeg', $headers['content-type'] );
-		$this->assertEquals( '40148', $headers['content-length'] );
-		$this->assertEquals( '200', wp_remote_retrieve_response_code( $response ) );
-	}
+    /**
+     * Test Get Response Cookie.
+     * 
+     * @ticket 33711
+     * @access public
+     * @return void
+     */
+    function test_get_response_cookies() 
+    {
+        $url = 'https://login.wordpress.org/wp-login.php';
 
-	function test_get_redirect() {
-		// this will redirect to asdftestblog1.files.wordpress.com
-		$url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg';
+        $response = wp_remote_head($url);
+        $cookies  = wp_remote_retrieve_cookies($response);
 
-		$response = wp_remote_get( $url );
-		$headers = wp_remote_retrieve_headers( $response );
+        $this->assertNotEmpty($cookies);
 
-		// should return the same headers as a head request
-		$this->assertEquals( 'image/jpeg', $headers['content-type'] );
-		$this->assertEquals( '40148', $headers['content-length'] );
-		$this->assertEquals( '200', wp_remote_retrieve_response_code( $response ) );
-	}
+        $cookie = wp_remote_retrieve_cookie($response, 'wordpress_test_cookie');
+        $this->assertInstanceOf('WP_Http_Cookie', $cookie);
+        $this->assertSame('wordpress_test_cookie', $cookie->name);
+        $this->assertSame('WP Cookie check', $cookie->value);
 
-	function test_get_redirect_limit_exceeded() {
-		// this will redirect to asdftestblog1.files.wordpress.com
-		$url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg';
+        $value = wp_remote_retrieve_cookie_value($response, 'wordpress_test_cookie');
+        $this->assertSame('WP Cookie check', $value);
 
-		// pretend we've already redirected 5 times
-		$response = wp_remote_get( $url, array( 'redirection' => -1 ) );
-		$this->assertWPError( $response );
-	}
+        $no_value = wp_remote_retrieve_cookie_value($response, 'not_a_cookie');
+        $this->assertSame('', $no_value);
 
-	/**
-	 * @ticket 33711
-	 */
-	function test_get_response_cookies() {
-		$url = 'https://login.wordpress.org/wp-login.php';
+        $no_cookie = wp_remote_retrieve_cookie($response, 'not_a_cookie');
+        $this->assertSame('', $no_cookie);
+    }
 
-		$response = wp_remote_head( $url );
-		$cookies  = wp_remote_retrieve_cookies( $response );
+    /**
+     * Test Get Response Cookies with WP HTTP Cookie Object.
+     * 
+     * @ticket 37437
+     * @access public
+     * @return void
+     */
+    function test_get_response_cookies_with_wp_http_cookie_object() 
+    {
+        $url = 'http://example.org';
 
-		$this->assertNotEmpty( $cookies );
+        $response = wp_remote_get(
+            $url, array(
+            'cookies' => array(
+            new WP_Http_Cookie(array( 'name' => 'test', 'value' => 'foo' )),
+            ),
+            ) 
+        );
+        $cookies  = wp_remote_retrieve_cookies($response);
 
-		$cookie = wp_remote_retrieve_cookie( $response, 'wordpress_test_cookie' );
-		$this->assertInstanceOf( 'WP_Http_Cookie', $cookie );
-		$this->assertSame( 'wordpress_test_cookie', $cookie->name );
-		$this->assertSame( 'WP Cookie check', $cookie->value );
+        $this->assertNotEmpty($cookies);
 
-		$value = wp_remote_retrieve_cookie_value( $response, 'wordpress_test_cookie' );
-		$this->assertSame( 'WP Cookie check', $value );
+        $cookie = wp_remote_retrieve_cookie($response, 'test');
+        $this->assertInstanceOf('WP_Http_Cookie', $cookie);
+        $this->assertSame('test', $cookie->name);
+        $this->assertSame('foo', $cookie->value);
+    }
 
-		$no_value = wp_remote_retrieve_cookie_value( $response, 'not_a_cookie' );
-		$this->assertSame( '', $no_value );
+    /**
+     * Test Get Response Cookies with Name Value Array.
+     * 
+     * @ticket 37437
+     * @access public
+     * @return void
+     */
+    function test_get_response_cookies_with_name_value_array() 
+    {
+        $url = 'http://example.org';
 
-		$no_cookie = wp_remote_retrieve_cookie( $response, 'not_a_cookie' );
-		$this->assertSame( '', $no_cookie );
-	}
+        $response = wp_remote_get(
+            $url, array(
+            'cookies' => array(
+            'test' => 'foo',
+            ),
+            ) 
+        );
+        $cookies  = wp_remote_retrieve_cookies($response);
 
-	/**
-	 * @ticket 37437
-	 */
-	function test_get_response_cookies_with_wp_http_cookie_object() {
-		$url = 'http://example.org';
+        $this->assertNotEmpty($cookies);
 
-		$response = wp_remote_get( $url, array(
-			'cookies' => array(
-				new WP_Http_Cookie( array( 'name' => 'test', 'value' => 'foo' ) ),
-			),
-		) );
-		$cookies  = wp_remote_retrieve_cookies( $response );
-
-		$this->assertNotEmpty( $cookies );
-
-		$cookie = wp_remote_retrieve_cookie( $response, 'test' );
-		$this->assertInstanceOf( 'WP_Http_Cookie', $cookie );
-		$this->assertSame( 'test', $cookie->name );
-		$this->assertSame( 'foo', $cookie->value );
-	}
-
-	/**
-	 * @ticket 37437
-	 */
-	function test_get_response_cookies_with_name_value_array() {
-		$url = 'http://example.org';
-
-		$response = wp_remote_get( $url, array(
-			'cookies' => array(
-				'test' => 'foo',
-			),
-		) );
-		$cookies  = wp_remote_retrieve_cookies( $response );
-
-		$this->assertNotEmpty( $cookies );
-
-		$cookie = wp_remote_retrieve_cookie( $response, 'test' );
-		$this->assertInstanceOf( 'WP_Http_Cookie', $cookie );
-		$this->assertSame( 'test', $cookie->name );
-		$this->assertSame( 'foo', $cookie->value );
-	}
+        $cookie = wp_remote_retrieve_cookie($response, 'test');
+        $this->assertInstanceOf('WP_Http_Cookie', $cookie);
+        $this->assertSame('test', $cookie->name);
+        $this->assertSame('foo', $cookie->value);
+    }
 }
Index: getHttpHeaders.php
===================================================================
--- getHttpHeaders.php	(revision 40341)
+++ getHttpHeaders.php	(working copy)
@@ -1,69 +1,94 @@
 <?php
 
 /**
- * @group http
+ * Tests_HTTP_GetHttpHeaders class.
+ * 
+ * @group   http
+ * @extends WP_UnitTestCase
  */
-class Tests_HTTP_GetHttpHeaders extends WP_UnitTestCase {
+class Tests_HTTP_GetHttpHeaders extends WP_UnitTestCase
+{
 
-	/**
-	 * Set up the environment
-	 */
-	public function setUp() {
-		parent::setUp();
+    /**
+     * Set up the environment.
+     * 
+     * @access public
+     * @return void
+     */
+    public function setUp() 
+    {
+        parent::setUp();
 
-		// Hook a fake HTTP request response.
-		add_filter( 'pre_http_request', array( $this, 'fake_http_request' ), 10, 3 );
-	}
+        // Hook a fake HTTP request response.
+        add_filter('pre_http_request', array( $this, 'fake_http_request' ), 10, 3);
+    }
 
-	/**
-	 * Clean up environment
-	 */
-	public function tearDown() {
-		parent::tearDown();
+    /**
+     * Clean up environment.
+     * 
+     * @access public
+     * @return void
+     */
+    public function tearDown() 
+    {
+        parent::tearDown();
 
-		// Clear the hook for the fake HTTP request response.
-		remove_filter( 'pre_http_request', array( $this, 'fake_http_request' ) );
-	}
+        // Clear the hook for the fake HTTP request response.
+        remove_filter('pre_http_request', array( $this, 'fake_http_request' ));
+    }
 
-	/**
-	 * Test with a valid URL
-	 */
-	public function test_wp_get_http_headers_valid_url() {
-		$result = wp_get_http_headers( 'http://example.com' );
-		$this->assertTrue( $result );
-	}
+    /**
+     * Test WP Get HTTP Headers has valid url.
+     * 
+     * @access public
+     * @return void
+     */
+    public function test_wp_get_http_headers_valid_url() 
+    {
+        $result = wp_get_http_headers('http://example.com');
+        $this->assertTrue($result);
+    }
 
-	/**
-	 * Test with an invalid URL
-	 */
-	public function test_wp_get_http_headers_invalid_url() {
-		$result = wp_get_http_headers( 'not_an_url' );
-		$this->assertFalse( $result );
-	}
+    /**
+     * Test WP Get HTTP Headers has invalid URL.
+     * 
+     * @access public
+     * @return void
+     */
+    public function test_wp_get_http_headers_invalid_url() 
+    {
+        $result = wp_get_http_headers('not_an_url');
+        $this->assertFalse($result);
+    }
 
-	/**
-	 * Test to see if the deprecated argument is working
-	 */
-	public function test_wp_get_http_headers_deprecated_argument() {
-		$this->setExpectedDeprecated( 'wp_get_http_headers' );
+    /**
+     * Test to see if the deprecated argument is working
+     * 
+     * @access public
+     * @return void
+     */
+    public function test_wp_get_http_headers_deprecated_argument() 
+    {
+        $this->setExpectedDeprecated('wp_get_http_headers');
 
-		wp_get_http_headers( 'does_not_matter', $deprecated = true );
-	}
+        wp_get_http_headers('does_not_matter', $deprecated = true);
+    }
 
-	/**
-	 * Mock the HTTP request response
-	 *
-	 * @param bool   $false     False.
-	 * @param array  $arguments Request arguments.
-	 * @param string $url       Request URL.
-	 *
-	 * @return array|bool
-	 */
-	public function fake_http_request( $false, $arguments, $url ) {
-		if ( 'http://example.com' === $url ) {
-			return array( 'headers' => true );
-		}
+    /**
+     * Mock the HTTP request response.
+     *
+     * @param bool   $false     False.
+     * @param array  $arguments Request arguments.
+     * @param string $url       Request URL.
+     *
+     * @return array|bool
+     */
+    public function fake_http_request( $false, $arguments, $url ) 
+    {
+        if ('http://example.com' === $url ) {
+            return array( 'headers' => true );
+        }
 
-		return false;
-	}
+        return false;
+    }
 }
Index: http.php
===================================================================
--- http.php	(revision 40341)
+++ http.php	(working copy)
@@ -4,314 +4,379 @@
  *
  * @group http
  */
-class Tests_HTTP_HTTP extends WP_UnitTestCase {
+class Tests_HTTP_HTTP extends WP_UnitTestCase
+{
+    
+    const FULL_TEST_URL = 'http://username:password@host.name:9090/path?arg1=value1&arg2=value2#anchor';
 
-	const FULL_TEST_URL = 'http://username:password@host.name:9090/path?arg1=value1&arg2=value2#anchor';
+    /**
+     * Test Make Absolute Url.
+     * 
+     * @access       public
+     * @dataProvider make_absolute_url_testcases
+     * @param        mixed $relative_url Relative URL.
+     * @param        mixed $absolute_url Absolute URL.
+     * @param        mixed $expected     Expected.
+     * @return       void
+     */
+    function test_make_absolute_url( $relative_url, $absolute_url, $expected ) 
+    {
+        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;
+        }
 
-	/**
-	 * @dataProvider make_absolute_url_testcases
-	 */
-	function test_make_absolute_url( $relative_url, $absolute_url, $expected ) {
-		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);
+        $this->assertEquals($expected, $actual);
+    }
+    
+    /**
+     * Make Absolute URL Test Cases.
+     * 
+     * @access public
+     * @return void
+     */
+    function make_absolute_url_testcases() 
+    {
+        // 0: The Location header, 1: The current url, 3: The expected url
+        return array(
+         array( 'http://site.com/', 'http://example.com/', 'http://site.com/' ), // Absolute URL provided
+         array( '/location', '', '/location' ), // No current url provided
 
-		$actual = WP_Http::make_absolute_url( $relative_url, $absolute_url );
-		$this->assertEquals( $expected, $actual );
-	}
+         array( '', 'http://example.com', 'http://example.com/' ), // No location provided
 
-	function make_absolute_url_testcases() {
-		// 0: The Location header, 1: The current url, 3: The expected url
-		return array(
-			array( 'http://site.com/', 'http://example.com/', 'http://site.com/' ), // Absolute URL provided
-			array( '/location', '', '/location' ), // No current url provided
+         // Location provided relative to site root
+         array( '/root-relative-link.ext', 'http://example.com/', 'http://example.com/root-relative-link.ext' ),
+         array( '/root-relative-link.ext?with=query', 'http://example.com/index.ext?query', 'http://example.com/root-relative-link.ext?with=query' ),
 
-			array( '', 'http://example.com', 'http://example.com/' ), // No location provided
+         // Location provided relative to current file/directory
+         array( 'relative-file.ext', 'http://example.com/', 'http://example.com/relative-file.ext' ),
+         array( 'relative-file.ext', 'http://example.com/filename', 'http://example.com/relative-file.ext' ),
+         array( 'relative-file.ext', 'http://example.com/directory/', 'http://example.com/directory/relative-file.ext' ),
 
-			// Location provided relative to site root
-			array( '/root-relative-link.ext', 'http://example.com/', 'http://example.com/root-relative-link.ext' ),
-			array( '/root-relative-link.ext?with=query', 'http://example.com/index.ext?query', 'http://example.com/root-relative-link.ext?with=query' ),
+         // Location provided relative to current file/directory but in a parent directory
+         array( '../file-in-parent.ext', 'http://example.com', 'http://example.com/file-in-parent.ext' ),
+         array( '../file-in-parent.ext', 'http://example.com/filename', 'http://example.com/file-in-parent.ext' ),
+         array( '../file-in-parent.ext', 'http://example.com/directory/', 'http://example.com/file-in-parent.ext' ),
+         array( '../file-in-parent.ext', 'http://example.com/directory/filename', 'http://example.com/file-in-parent.ext' ),
 
-			// Location provided relative to current file/directory
-			array( 'relative-file.ext', 'http://example.com/', 'http://example.com/relative-file.ext' ),
-			array( 'relative-file.ext', 'http://example.com/filename', 'http://example.com/relative-file.ext' ),
-			array( 'relative-file.ext', 'http://example.com/directory/', 'http://example.com/directory/relative-file.ext' ),
+         // Location provided in muliple levels higher, including impossible to reach (../ below DOCROOT)
+         array( '../../file-in-grand-parent.ext', 'http://example.com', 'http://example.com/file-in-grand-parent.ext' ),
+         array( '../../file-in-grand-parent.ext', 'http://example.com/filename', 'http://example.com/file-in-grand-parent.ext' ),
+         array( '../../file-in-grand-parent.ext', 'http://example.com/directory/', 'http://example.com/file-in-grand-parent.ext' ),
+         array( '../../file-in-grand-parent.ext', 'http://example.com/directory/filename/', 'http://example.com/file-in-grand-parent.ext' ),
+         array( '../../file-in-grand-parent.ext', 'http://example.com/directory1/directory2/filename', 'http://example.com/file-in-grand-parent.ext' ),
 
-			// Location provided relative to current file/directory but in a parent directory
-			array( '../file-in-parent.ext', 'http://example.com', 'http://example.com/file-in-parent.ext' ),
-			array( '../file-in-parent.ext', 'http://example.com/filename', 'http://example.com/file-in-parent.ext' ),
-			array( '../file-in-parent.ext', 'http://example.com/directory/', 'http://example.com/file-in-parent.ext' ),
-			array( '../file-in-parent.ext', 'http://example.com/directory/filename', 'http://example.com/file-in-parent.ext' ),
+         // Query strings should attach, or replace existing query string.
+         array( '?query=string', 'http://example.com', 'http://example.com/?query=string' ),
+         array( '?query=string', 'http://example.com/file.ext', 'http://example.com/file.ext?query=string' ),
+         array( '?query=string', 'http://example.com/file.ext?existing=query-string', 'http://example.com/file.ext?query=string' ),
+         array( 'otherfile.ext?query=string', 'http://example.com/file.ext?existing=query-string', 'http://example.com/otherfile.ext?query=string' ),
 
-			// Location provided in muliple levels higher, including impossible to reach (../ below DOCROOT)
-			array( '../../file-in-grand-parent.ext', 'http://example.com', 'http://example.com/file-in-grand-parent.ext' ),
-			array( '../../file-in-grand-parent.ext', 'http://example.com/filename', 'http://example.com/file-in-grand-parent.ext' ),
-			array( '../../file-in-grand-parent.ext', 'http://example.com/directory/', 'http://example.com/file-in-grand-parent.ext' ),
-			array( '../../file-in-grand-parent.ext', 'http://example.com/directory/filename/', 'http://example.com/file-in-grand-parent.ext' ),
-			array( '../../file-in-grand-parent.ext', 'http://example.com/directory1/directory2/filename', 'http://example.com/file-in-grand-parent.ext' ),
+         // A file with a leading dot
+         array( '.ext', 'http://example.com/', 'http://example.com/.ext' ),
 
-			// Query strings should attach, or replace existing query string.
-			array( '?query=string', 'http://example.com', 'http://example.com/?query=string' ),
-			array( '?query=string', 'http://example.com/file.ext', 'http://example.com/file.ext?query=string' ),
-			array( '?query=string', 'http://example.com/file.ext?existing=query-string', 'http://example.com/file.ext?query=string' ),
-			array( 'otherfile.ext?query=string', 'http://example.com/file.ext?existing=query-string', 'http://example.com/otherfile.ext?query=string' ),
+         // URls within URLs
+         array( '/expected', 'http://example.com/sub/http://site.com/sub/', 'http://example.com/expected' ),
+         array( '/expected/http://site.com/sub/', 'http://example.com/', 'http://example.com/expected/http://site.com/sub/' ),
 
-			// A file with a leading dot
-			array( '.ext', 'http://example.com/', 'http://example.com/.ext' ),
+         // Schemeless URL's (Not valid in HTTP Headers, but may be used elsewhere)
+         array( '//example.com/sub/', 'https://example.net', 'https://example.com/sub/' ),
+        );
+    }
 
-			// URls within URLs
-			array( '/expected', 'http://example.com/sub/http://site.com/sub/', 'http://example.com/expected' ),
-			array( '/expected/http://site.com/sub/', 'http://example.com/', 'http://example.com/expected/http://site.com/sub/' ),
+    /**
+     * Test WP Parse URL.
+     * 
+     * @access       public
+     * @param        mixed $url      URL.
+     * @param        mixed $expected Expected.
+     * @dataProvider parse_url_testcases
+     * @return       void
+     */
+    function test_wp_parse_url( $url, $expected ) 
+    {
+        $actual = wp_parse_url($url);
+        $this->assertEquals($expected, $actual);
+    }
+    
+    /**
+     * Parse URL Test Cases.
+     * 
+     * @access public
+     * @return void
+     */
+    function parse_url_testcases() 
+    {
+        // 0: The URL, 1: The expected resulting structure.
+        return array(
+         array( self::FULL_TEST_URL, array(
+          'scheme'   => 'http',
+          'host'     => 'host.name',
+          'port'     => 9090,
+          'user'     => 'username',
+          'pass'     => 'password',
+          'path'     => '/path',
+          'query'    => 'arg1=value1&arg2=value2',
+          'fragment' => 'anchor',
+         ) ),
+         array( 'http://example.com/', array( 'scheme' => 'http', 'host' => 'example.com', 'path' => '/' ) ),
 
-			// Schemeless URL's (Not valid in HTTP Headers, but may be used elsewhere)
-			array( '//example.com/sub/', 'https://example.net', 'https://example.com/sub/' ),
-		);
-	}
+         // < PHP 5.4.7: Schemeless URL.
+         array( '//example.com/path/', array( 'host' => 'example.com', 'path' => '/path/' ) ),
+         array( '//example.com/', array( 'host' => 'example.com', 'path' => '/' ) ),
+         array( 'http://example.com//path/', array( 'scheme' => 'http', 'host' => 'example.com', 'path' => '//path/' ) ),
 
-	/**
-	 * @dataProvider parse_url_testcases
-	 */
-	function test_wp_parse_url( $url, $expected ) {
-		$actual = wp_parse_url( $url );
-		$this->assertEquals( $expected, $actual );
-	}
+         // < PHP 5.4.7: Scheme separator in the URL.
+         array( 'http://example.com/http://example.net/', array( 'scheme' => 'http', 'host' => 'example.com', 'path' => '/http://example.net/' ) ),
+         array( '/path/http://example.net/', array( 'path' => '/path/http://example.net/' ) ),
 
-	function parse_url_testcases() {
-		// 0: The URL, 1: The expected resulting structure
-		return array(
-			array( self::FULL_TEST_URL, array(
-				'scheme'   => 'http',
-				'host'     => 'host.name',
-				'port'     => 9090,
-				'user'     => 'username',
-				'pass'     => 'password',
-				'path'     => '/path',
-				'query'    => 'arg1=value1&arg2=value2',
-				'fragment' => 'anchor',
-			) ),
-			array( 'http://example.com/', array( 'scheme' => 'http', 'host' => 'example.com', 'path' => '/' ) ),
+         // < PHP 5.4.7: IPv6 literals in schemeless URLs are handled incorrectly.
+         array( '//[::FFFF::127.0.0.1]/', array( 'host' => '[::FFFF::127.0.0.1]', 'path' => '/' ) ),
 
-			// < PHP 5.4.7: Schemeless URL
-			array( '//example.com/path/', array( 'host' => 'example.com', 'path' => '/path/' ) ),
-			array( '//example.com/', array( 'host' => 'example.com', 'path' => '/' ) ),
-			array( 'http://example.com//path/', array( 'scheme' => 'http', 'host' => 'example.com', 'path' => '//path/' ) ),
+         // PHP's parse_url() calls this an invalid url, we handle it as a path
+         array( '/://example.com/', array( 'path' => '/://example.com/' ) ),
 
-			// < PHP 5.4.7: Scheme separator in the URL.
-			array( 'http://example.com/http://example.net/', array( 'scheme' => 'http', 'host' => 'example.com', 'path' => '/http://example.net/' ) ),
-			array( '/path/http://example.net/', array( 'path' => '/path/http://example.net/' ) ),
+         // Schemeless URL containing colons cause parse errors in PHP 7+.
+         array(
+          '//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin',
+          array(
+        'host'  => 'fonts.googleapis.com',
+        'path'  => '/css',
+        'query' => 'family=Open+Sans:400&subset=latin',
+          ),
+         ),
+         array(
+          '//fonts.googleapis.com/css?family=Open+Sans:400',
+          array(
+        'host'  => 'fonts.googleapis.com',
+        'path'  => '/css',
+        'query' => 'family=Open+Sans:400',
+          ),
+         ),
 
-			// < PHP 5.4.7: IPv6 literals in schemeless URLs are handled incorrectly.
-			array( '//[::FFFF::127.0.0.1]/', array( 'host' => '[::FFFF::127.0.0.1]', 'path' => '/' ) ),
+         array( 'filenamefound', array( 'path' => 'filenamefound' ) ),
 
-			// PHP's parse_url() calls this an invalid url, we handle it as a path
-			array( '/://example.com/', array( 'path' => '/://example.com/' ) ),
+         // Empty string or non-string passed in.
+         array( '', array( 'path' => '' ) ),
+         array( 123, array( 'path' => '123' ) ),
+        );
+        /*
+        Untestable edge cases in various PHP:
+          - ///example.com - Fails in PHP >= 5.4.7, assumed path in <5.4.7
+          - ://example.com - assumed path in PHP >= 5.4.7, fails in <5.4.7
+        */
+    }
 
-			// Schemeless URL containing colons cause parse errors in PHP 7+.
-			array(
-				'//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin',
-				array(
-					'host'  => 'fonts.googleapis.com',
-					'path'  => '/css',
-					'query' => 'family=Open+Sans:400&subset=latin',
-				),
-			),
-			array(
-				'//fonts.googleapis.com/css?family=Open+Sans:400',
-				array(
-					'host'  => 'fonts.googleapis.com',
-					'path'  => '/css',
-					'query' => 'family=Open+Sans:400',
-				),
-			),
+    /**
+     * Test WP Parse URL with Default Component.
+     * 
+     * @ticket 36356
+     * @access public
+     * @return void
+     */
+    function test_wp_parse_url_with_default_component() 
+    {
+        $actual = wp_parse_url(self::FULL_TEST_URL, -1);
+        $this->assertEquals(
+            array(
+            'scheme'   => 'http',
+            'host'     => 'host.name',
+            'port'     => 9090,
+            'user'     => 'username',
+            'pass'     => 'password',
+            'path'     => '/path',
+            'query'    => 'arg1=value1&arg2=value2',
+            'fragment' => 'anchor',
+            ), $actual 
+        );
+    }
 
-			array( 'filenamefound', array( 'path' => 'filenamefound' ) ),
+    /**
+     * @ticket 36356
+     *
+     * @dataProvider parse_url_component_testcases
+     */
+    function test_wp_parse_url_with_component( $url, $component, $expected ) 
+    {
+        $actual = wp_parse_url($url, $component);
+        $this->assertSame($expected, $actual);
+    }
+    
+    /**
+     * Parse URL Component Test Cases.
+     * 
+     * @access public
+     * @return void
+     */
+    function parse_url_component_testcases() 
+    {
+        // 0: The URL, 1: The requested component, 2: The expected resulting structure.
+        return array(
+         array( self::FULL_TEST_URL, PHP_URL_SCHEME, 'http' ),
+         array( self::FULL_TEST_URL, PHP_URL_USER, 'username' ),
+         array( self::FULL_TEST_URL, PHP_URL_PASS, 'password' ),
+         array( self::FULL_TEST_URL, PHP_URL_HOST, 'host.name' ),
+         array( self::FULL_TEST_URL, PHP_URL_PORT, 9090 ),
+         array( self::FULL_TEST_URL, PHP_URL_PATH, '/path' ),
+         array( self::FULL_TEST_URL, PHP_URL_QUERY, 'arg1=value1&arg2=value2' ),
+         array( self::FULL_TEST_URL, PHP_URL_FRAGMENT, 'anchor' ),
 
-			// Empty string or non-string passed in.
-			array( '', array( 'path' => '' ) ),
-			array( 123, array( 'path' => '123' ) ),
-		);
-		/*
-		Untestable edge cases in various PHP:
-		  - ///example.com - Fails in PHP >= 5.4.7, assumed path in <5.4.7
-		  - ://example.com - assumed path in PHP >= 5.4.7, fails in <5.4.7
-		*/
-	}
+         // < PHP 5.4.7: Schemeless URL.
+         array( '//example.com/path/', PHP_URL_HOST, 'example.com' ),
+         array( '//example.com/path/', PHP_URL_PATH, '/path/' ),
+         array( '//example.com/', PHP_URL_HOST, 'example.com' ),
+         array( '//example.com/', PHP_URL_PATH, '/' ),
+         array( 'http://example.com//path/', PHP_URL_HOST, 'example.com' ),
+         array( 'http://example.com//path/', PHP_URL_PATH, '//path/' ),
 
-	/**
-	 * @ticket 36356
-	 */
-	function test_wp_parse_url_with_default_component() {
-		$actual = wp_parse_url( self::FULL_TEST_URL, -1 );
-		$this->assertEquals( array(
-			'scheme'   => 'http',
-			'host'     => 'host.name',
-			'port'     => 9090,
-			'user'     => 'username',
-			'pass'     => 'password',
-			'path'     => '/path',
-			'query'    => 'arg1=value1&arg2=value2',
-			'fragment' => 'anchor',
-		), $actual );
-	}
+         // < PHP 5.4.7: Scheme separator in the URL.
+         array( 'http://example.com/http://example.net/', PHP_URL_HOST, 'example.com' ),
+         array( 'http://example.com/http://example.net/', PHP_URL_PATH, '/http://example.net/' ),
+         array( '/path/http://example.net/', PHP_URL_HOST, null ),
+         array( '/path/http://example.net/', PHP_URL_PATH, '/path/http://example.net/' ),
 
-	/**
-	 * @ticket 36356
-	 *
-	 * @dataProvider parse_url_component_testcases
-	 */
-	function test_wp_parse_url_with_component( $url, $component, $expected ) {
-		$actual = wp_parse_url( $url, $component );
-		$this->assertSame( $expected, $actual );
-	}
+         // < PHP 5.4.7: IPv6 literals in schemeless URLs are handled incorrectly.
+         array( '//[::FFFF::127.0.0.1]/', PHP_URL_HOST, '[::FFFF::127.0.0.1]' ),
+         array( '//[::FFFF::127.0.0.1]/', PHP_URL_PATH, '/' ),
 
-	function parse_url_component_testcases() {
-		// 0: The URL, 1: The requested component, 2: The expected resulting structure.
-		return array(
-			array( self::FULL_TEST_URL, PHP_URL_SCHEME, 'http' ),
-			array( self::FULL_TEST_URL, PHP_URL_USER, 'username' ),
-			array( self::FULL_TEST_URL, PHP_URL_PASS, 'password' ),
-			array( self::FULL_TEST_URL, PHP_URL_HOST, 'host.name' ),
-			array( self::FULL_TEST_URL, PHP_URL_PORT, 9090 ),
-			array( self::FULL_TEST_URL, PHP_URL_PATH, '/path' ),
-			array( self::FULL_TEST_URL, PHP_URL_QUERY, 'arg1=value1&arg2=value2' ),
-			array( self::FULL_TEST_URL, PHP_URL_FRAGMENT, 'anchor' ),
+         // PHP's parse_url() calls this an invalid URL, we handle it as a path.
+         array( '/://example.com/', PHP_URL_PATH, '/://example.com/' ),
 
-			// < PHP 5.4.7: Schemeless URL.
-			array( '//example.com/path/', PHP_URL_HOST, 'example.com' ),
-			array( '//example.com/path/', PHP_URL_PATH, '/path/' ),
-			array( '//example.com/', PHP_URL_HOST, 'example.com' ),
-			array( '//example.com/', PHP_URL_PATH, '/' ),
-			array( 'http://example.com//path/', PHP_URL_HOST, 'example.com' ),
-			array( 'http://example.com//path/', PHP_URL_PATH, '//path/' ),
+         // Schemeless URL containing colons cause parse errors in PHP 7+.
+         array( '//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin', PHP_URL_HOST, 'fonts.googleapis.com' ),
+         array( '//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin', PHP_URL_PORT, null ),
+         array( '//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin', PHP_URL_PATH, '/css' ),
+         array( '//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin', PHP_URL_QUERY, 'family=Open+Sans:400&subset=latin' ),
+         array( '//fonts.googleapis.com/css?family=Open+Sans:400', PHP_URL_HOST, 'fonts.googleapis.com' ), // 25
+         array( '//fonts.googleapis.com/css?family=Open+Sans:400', PHP_URL_PORT, null ),
+         array( '//fonts.googleapis.com/css?family=Open+Sans:400', PHP_URL_PATH, '/css' ), //27
+         array( '//fonts.googleapis.com/css?family=Open+Sans:400', PHP_URL_QUERY, 'family=Open+Sans:400' ), //28
 
-			// < PHP 5.4.7: Scheme separator in the URL.
-			array( 'http://example.com/http://example.net/', PHP_URL_HOST, 'example.com' ),
-			array( 'http://example.com/http://example.net/', PHP_URL_PATH, '/http://example.net/' ),
-			array( '/path/http://example.net/', PHP_URL_HOST, null ),
-			array( '/path/http://example.net/', PHP_URL_PATH, '/path/http://example.net/' ),
+         // Empty string or non-string passed in.
+         array( '', PHP_URL_PATH, '' ),
+         array( '', PHP_URL_QUERY, null ),
+         array( 123, PHP_URL_PORT, null ),
+         array( 123, PHP_URL_PATH, '123' ),
+        );
+    }
 
-			// < PHP 5.4.7: IPv6 literals in schemeless URLs are handled incorrectly.
-			array( '//[::FFFF::127.0.0.1]/', PHP_URL_HOST, '[::FFFF::127.0.0.1]' ),
-			array( '//[::FFFF::127.0.0.1]/', PHP_URL_PATH, '/' ),
+    /**
+     * @ticket 35426
+     */
+    public function test_http_response_code_constants() 
+    {
+        global $wp_header_to_desc;
 
-			// PHP's parse_url() calls this an invalid URL, we handle it as a path.
-			array( '/://example.com/', PHP_URL_PATH, '/://example.com/' ),
+        $ref = new ReflectionClass('WP_Http');
+        $constants = $ref->getConstants();
 
-			// Schemeless URL containing colons cause parse errors in PHP 7+.
-			array( '//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin', PHP_URL_HOST, 'fonts.googleapis.com' ),
-			array( '//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin', PHP_URL_PORT, null ),
-			array( '//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin', PHP_URL_PATH, '/css' ),
-			array( '//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin', PHP_URL_QUERY, 'family=Open+Sans:400&subset=latin' ),
-			array( '//fonts.googleapis.com/css?family=Open+Sans:400', PHP_URL_HOST, 'fonts.googleapis.com' ), // 25
-			array( '//fonts.googleapis.com/css?family=Open+Sans:400', PHP_URL_PORT, null ),
-			array( '//fonts.googleapis.com/css?family=Open+Sans:400', PHP_URL_PATH, '/css' ), //27
-			array( '//fonts.googleapis.com/css?family=Open+Sans:400', PHP_URL_QUERY, 'family=Open+Sans:400' ), //28
+        // This primes the `$wp_header_to_desc` global:
+        get_status_header_desc(200);
 
-			// Empty string or non-string passed in.
-			array( '', PHP_URL_PATH, '' ),
-			array( '', PHP_URL_QUERY, null ),
-			array( 123, PHP_URL_PORT, null ),
-			array( 123, PHP_URL_PATH, '123' ),
-		);
-	}
+        $this->assertEquals(array_keys($wp_header_to_desc), array_values($constants));
 
-	/**
-	 * @ticket 35426
-	 */
-	public function test_http_response_code_constants() {
-		global $wp_header_to_desc;
+    }
 
-		$ref = new ReflectionClass( 'WP_Http' );
-		$constants = $ref->getConstants();
+    /**
+     * @ticket 37768
+     */
+    public function test_normalize_cookies_scalar_values() 
+    {
+        $http = _wp_http_get_object();
 
-		// This primes the `$wp_header_to_desc` global:
-		get_status_header_desc( 200 );
+        $cookies = array(
+         'x'   => 'foo',
+         'y'   => 2,
+         'z'   => 0.45,
+         'foo' => array( 'bar' ),
+        );
 
-		$this->assertEquals( array_keys( $wp_header_to_desc ), array_values( $constants ) );
+        $cookie_jar = $http->normalize_cookies(
+            array(
+            'x'   => 'foo',
+            'y'   => 2,
+            'z'   => 0.45,
+            'foo' => array( 'bar' ),
+            ) 
+        );
 
-	}
+        $this->assertInstanceOf('Requests_Cookie_Jar', $cookie_jar);
 
-	/**
-	 * @ticket 37768
-	 */
-	public function test_normalize_cookies_scalar_values() {
-		$http = _wp_http_get_object();
+        foreach( array_keys($cookies) as $cookie ) {
+            if ('foo' === $cookie ) {
+                $this->assertFalse(isset($cookie_jar[ $cookie ]));
+            } else {
+                $this->assertInstanceOf('Requests_Cookie', $cookie_jar[ $cookie ]);
+            }
+        }
+    }
 
-		$cookies = array(
-			'x'   => 'foo',
-			'y'   => 2,
-			'z'   => 0.45,
-			'foo' => array( 'bar' ),
-		);
+    /**
+     * @ticket 36356
+     *
+     * @dataProvider get_component_from_parsed_url_array_testcases
+     */
+    function test_get_component_from_parsed_url_array( $url, $component, $expected ) 
+    {
+        $parts  = wp_parse_url($url);
+        $actual = _get_component_from_parsed_url_array($parts, $component);
+        $this->assertSame($expected, $actual);
+    }
+    
+    /**
+     * Get Component from Parsed URL Array TestCases.
+     * 
+     * @access public
+     * @return void
+     */
+    function get_component_from_parsed_url_array_testcases() 
+    {
+        // 0: A URL, 1: PHP URL constant, 2: The expected result.
+        return array(
+         array( 'http://example.com/', -1, array( 'scheme' => 'http', 'host' => 'example.com', 'path' => '/' ) ),
+         array( 'http://example.com/', -1, array( 'scheme' => 'http', 'host' => 'example.com', 'path' => '/' ) ),
+         array( 'http://example.com/', PHP_URL_HOST, 'example.com' ),
+         array( 'http://example.com/', PHP_URL_USER, null ),
+         array( 'http:///example.com', -1, false ), // Malformed.
+         array( 'http:///example.com', PHP_URL_HOST, null ), // Malformed.
+        );
+    }
 
-		$cookie_jar = $http->normalize_cookies( array(
-			'x'   => 'foo',
-			'y'   => 2,
-			'z'   => 0.45,
-			'foo' => array( 'bar' ),
-		) );
+    /**
+     * @ticket 36356
+     *
+     * @dataProvider wp_translate_php_url_constant_to_key_testcases
+     */
+    function test_wp_translate_php_url_constant_to_key( $input, $expected ) 
+    {
+        $actual = _wp_translate_php_url_constant_to_key($input);
+        $this->assertSame($expected, $actual);
+    }
+    
+    /**
+     * WP Translate PHP URL Constant to Key Testcases.
+     * 
+     * @access public
+     * @return void
+     */
+    function wp_translate_php_url_constant_to_key_testcases() 
+    {
+        // 0: PHP URL constant, 1: The expected result.
+        return array(
+         array( PHP_URL_SCHEME, 'scheme' ),
+         array( PHP_URL_HOST, 'host' ),
+         array( PHP_URL_PORT, 'port' ),
+         array( PHP_URL_USER, 'user' ),
+         array( PHP_URL_PASS, 'pass' ),
+         array( PHP_URL_PATH, 'path' ),
+         array( PHP_URL_QUERY, 'query' ),
+         array( PHP_URL_FRAGMENT, 'fragment' ),
 
-		$this->assertInstanceOf( 'Requests_Cookie_Jar', $cookie_jar );
+         // Test with non-PHP_URL_CONSTANT parameter.
+         array( 'something', false ),
+         array( ABSPATH, false ),
+        );
+    }
 
-		foreach( array_keys( $cookies ) as $cookie ) {
-			if ( 'foo' === $cookie ) {
-				$this->assertFalse( isset( $cookie_jar[ $cookie ] ) );
-			} else {
-				$this->assertInstanceOf( 'Requests_Cookie', $cookie_jar[ $cookie ] );
-			}
-		}
-	}
-
-	/**
-	 * @ticket 36356
-	 *
-	 * @dataProvider get_component_from_parsed_url_array_testcases
-	 */
-	function test_get_component_from_parsed_url_array( $url, $component, $expected ) {
-		$parts  = wp_parse_url( $url );
-		$actual = _get_component_from_parsed_url_array( $parts, $component );
-		$this->assertSame( $expected, $actual );
-	}
-
-	function get_component_from_parsed_url_array_testcases() {
-		// 0: A URL, 1: PHP URL constant, 2: The expected result.
-		return array(
-			array( 'http://example.com/', -1, array( 'scheme' => 'http', 'host' => 'example.com', 'path' => '/' ) ),
-			array( 'http://example.com/', -1, array( 'scheme' => 'http', 'host' => 'example.com', 'path' => '/' ) ),
-			array( 'http://example.com/', PHP_URL_HOST, 'example.com' ),
-			array( 'http://example.com/', PHP_URL_USER, null ),
-			array( 'http:///example.com', -1, false ), // Malformed.
-			array( 'http:///example.com', PHP_URL_HOST, null ), // Malformed.
-		);
-	}
-
-	/**
-	 * @ticket 36356
-	 *
-	 * @dataProvider wp_translate_php_url_constant_to_key_testcases
-	 */
-	function test_wp_translate_php_url_constant_to_key( $input, $expected ) {
-		$actual = _wp_translate_php_url_constant_to_key( $input );
-		$this->assertSame( $expected, $actual );
-	}
-
-	function wp_translate_php_url_constant_to_key_testcases() {
-		// 0: PHP URL constant, 1: The expected result.
-		return array(
-			array( PHP_URL_SCHEME, 'scheme' ),
-			array( PHP_URL_HOST, 'host' ),
-			array( PHP_URL_PORT, 'port' ),
-			array( PHP_URL_USER, 'user' ),
-			array( PHP_URL_PASS, 'pass' ),
-			array( PHP_URL_PATH, 'path' ),
-			array( PHP_URL_QUERY, 'query' ),
-			array( PHP_URL_FRAGMENT, 'fragment' ),
-
-			// Test with non-PHP_URL_CONSTANT parameter.
-			array( 'something', false ),
-			array( ABSPATH, false ),
-		);
-	}
-
 }
Index: remoteRetrieveHeaders.php
===================================================================
--- remoteRetrieveHeaders.php	(revision 40341)
+++ remoteRetrieveHeaders.php	(working copy)
@@ -1,38 +1,54 @@
 <?php
 
 /**
- * @group http
+ * Tests_HTTP_RemoteRetrieveHeaders class.
+ * 
+ * @group   http
+ * @extends WP_UnitTestCase
  */
-class Tests_HTTP_RemoteRetrieveHeaders extends WP_UnitTestCase {
+class Tests_HTTP_RemoteRetrieveHeaders extends WP_UnitTestCase
+{
 
-	/**
-	 * Valid response
-	 */
-	function test_remote_retrieve_headers_valid_response() {
-		$headers = 'headers_data';
-		$response = array( 'headers' => $headers );
+    /**
+     * Test Remote Retrieve Headers has valid response.
+     * 
+     * @access public
+     * @return void
+     */
+    function test_remote_retrieve_headers_valid_response() 
+    {
+        $headers = 'headers_data';
+        $response = array( 'headers' => $headers );
 
-		$result = wp_remote_retrieve_headers( $response );
-		$this->assertEquals( $headers, $result );
-	}
+        $result = wp_remote_retrieve_headers($response);
+        $this->assertEquals($headers, $result);
+    }
 
-	/**
-	 * Response is a WP_Error
-	 */
-	function test_remote_retrieve_headers_is_error() {
-		$response = new WP_Error( 'Some error' );
+    /**
+     * Response is a WP_Error
+     * 
+     * @access public
+     * @return void
+     */
+    function test_remote_retrieve_headers_is_error() 
+    {
+        $response = new WP_Error('Some error');
 
-		$result = wp_remote_retrieve_headers( $response );
-		$this->assertEquals( array(), $result );
-	}
+        $result = wp_remote_retrieve_headers($response);
+        $this->assertEquals(array(), $result);
+    }
 
-	/**
-	 * Response does not contain 'headers'
-	 */
-	function test_remote_retrieve_headers_invalid_response() {
-		$response = array( 'no_headers' => 'set');
+    /**
+     * Response does not contain 'headers'.
+     * 
+     * @access public
+     * @return void
+     */
+    function test_remote_retrieve_headers_invalid_response() 
+    {
+        $response = array( 'no_headers' => 'set');
 
-		$result = wp_remote_retrieve_headers( $response );
-		$this->assertEquals( array(), $result );
-	}
+        $result = wp_remote_retrieve_headers($response);
+        $this->assertEquals(array(), $result);
+    }
 }
Index: streams.php
===================================================================
--- streams.php	(revision 40341)
+++ streams.php	(working copy)
@@ -1,11 +1,24 @@
 <?php
 
-require_once dirname( __FILE__ ) . '/base.php';
+require_once dirname(__FILE__) . '/base.php';
 
 /**
- * @group http
- * @group external-http
+ * Tests_HTTP_streams class.
+ * 
+ * @group   http
+ * @group   external-http
+ * @extends WP_HTTP_UnitTestCase
  */
-class Tests_HTTP_streams extends WP_HTTP_UnitTestCase {
-	var $transport = 'streams';
+class Tests_HTTP_streams extends WP_HTTP_UnitTestCase
+{
+    
+    /**
+     * Transport.
+     * 
+     * (default value: 'streams')
+     * 
+     * @var    string
+     * @access public
+     */
+    var $transport = 'streams';
 }
