Make WordPress Core

Changeset 1231 in tests for trunk/tests/http/base.php


Ignore:
Timestamp:
03/04/2013 06:19:32 AM (12 years ago)
Author:
dd32
Message:

Rename the WP_HTTP testcase 'test_location_header_on_200' to 'test_location_header_on_201' and modify test / test script accordingly, PHP doesn't allow us to issue a Location with a 200 response, and the ticket it refers to is specifically about 201 responses.
See #16889

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/http/base.php

    r1205 r1231  
    132132     *
    133133     * @ticket 16889
    134      *
    135      * Is this valid? Streams, cURL and therefore PHP Extension (ie. all PHP Internal) follow redirects
    136      * on all status codes, currently all of WP_HTTP follows this template.
    137134     */
    138     function test_location_header_on_200() {
     135    function test_location_header_on_201() {
    139136        // Prints PASS on initial load, FAIL if the client follows the specified redirection
    140         $res = wp_remote_request( $this->redirection_script . '?200-location=true' );
     137        $res = wp_remote_request( $this->redirection_script . '?201-location=true' );
    141138        $this->assertFalse( is_wp_error( $res ) );
    142139        $this->assertEquals( 'PASS', $res['body']);
Note: See TracChangeset for help on using the changeset viewer.