Make WordPress Core

Changeset 894 in tests for trunk/tests/test_http.php


Ignore:
Timestamp:
07/09/2012 03:32:24 PM (12 years ago)
Author:
nacin
Message:

Convert knownWPBug and knownUTBug to @ticket annotations. fixes #102.

Allows for an extra description to be included with the annotation,
which will be passed to markTestSkipped().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/test_http.php

    r875 r894  
    5959    }
    6060
     61    /**
     62     * @ticket 16855
     63     */
    6164    function test_redirect_on_301_no_redirect() {
    62         $this->knownWPBug(16855);
    6365        // 5 > 0 & 301
    6466        $res = wp_remote_request($this->redirection_script . '?code=301&rt=' . 5, array('redirection' => 0) );
     
    6769    }
    6870
     71    /**
     72     * @ticket 16855
     73     */
    6974    function test_redirect_on_302_no_redirect() {
    70         $this->knownWPBug(16855);
    7175        // 5 > 0 & 302
    7276        $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) );
     
    8993    }
    9094
     95    /**
     96     * @ticket 16855
     97     */
    9198    function test_redirect_on_head() {
    92         $this->knownWPBug(16855);
    9399        // Redirections on HEAD request when Requested
    94100        $res = wp_remote_request($this->redirection_script . '?rt=' . 5, array('redirection' => 5, 'method' => 'HEAD') );
     
    115121    }
    116122
     123    /**
     124     * @ticket 16855
     125     */
    117126    function test_redirections_zero_redirections_specified() {
    118         $this->knownWPBug(16855);
    119127        // 0 redirections asked for, Should return the document?
    120128        $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) );
     
    123131    }
    124132
     133    /**
     134     * Do not redirect on non 3xx status codes
     135     *
     136     * @ticket 16889
     137     *
     138     * Is this valid? Streams, cURL and therefore PHP Extension (ie. all PHP Internal) follow redirects
     139     * on all status codes, currently all of WP_HTTP follows this template.
     140     */
    125141    function test_location_header_on_200() {
    126         //$this->knownWPBug(16889);
    127         // Is this valid? Streams, cURL and therefor, PHP Extension (ie. all PHP Internal) follow redirects on all status codes, currently all of WP_HTTP follows this template.
    128 
    129         // Do not redirect on non 3xx status codes
    130         //$res = wp_remote_request( $this->redirection_script . '?200-location=true' ); // Prints PASS on initial load, FAIL if the client follows the specified redirection
    131         //$this->assertEquals( 'PASS', $res['body']);
    132     }
    133 
     142        // Prints PASS on initial load, FAIL if the client follows the specified redirection
     143        $res = wp_remote_request( $this->redirection_script . '?200-location=true' );
     144        $this->assertEquals( 'PASS', $res['body']);
     145    }
     146
     147    /**
     148     * @ticket 11888
     149     */
    134150    function test_send_headers() {
    135         $this->knownWPBug(11888);
    136151        // Test that the headers sent are recieved by the server
    137152        $headers = array('test1' => 'test', 'test2' => 0, 'test3' => '');
Note: See TracChangeset for help on using the changeset viewer.