Changeset 894 in tests for trunk/tests/test_http.php
- Timestamp:
- 07/09/2012 03:32:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/test_http.php
r875 r894 59 59 } 60 60 61 /** 62 * @ticket 16855 63 */ 61 64 function test_redirect_on_301_no_redirect() { 62 $this->knownWPBug(16855);63 65 // 5 > 0 & 301 64 66 $res = wp_remote_request($this->redirection_script . '?code=301&rt=' . 5, array('redirection' => 0) ); … … 67 69 } 68 70 71 /** 72 * @ticket 16855 73 */ 69 74 function test_redirect_on_302_no_redirect() { 70 $this->knownWPBug(16855);71 75 // 5 > 0 & 302 72 76 $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) ); … … 89 93 } 90 94 95 /** 96 * @ticket 16855 97 */ 91 98 function test_redirect_on_head() { 92 $this->knownWPBug(16855);93 99 // Redirections on HEAD request when Requested 94 100 $res = wp_remote_request($this->redirection_script . '?rt=' . 5, array('redirection' => 5, 'method' => 'HEAD') ); … … 115 121 } 116 122 123 /** 124 * @ticket 16855 125 */ 117 126 function test_redirections_zero_redirections_specified() { 118 $this->knownWPBug(16855);119 127 // 0 redirections asked for, Should return the document? 120 128 $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) ); … … 123 131 } 124 132 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 */ 125 141 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 codes130 //$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 */ 134 150 function test_send_headers() { 135 $this->knownWPBug(11888);136 151 // Test that the headers sent are recieved by the server 137 152 $headers = array('test1' => 'test', 'test2' => 0, 'test3' => '');
Note: See TracChangeset
for help on using the changeset viewer.