WordPress.org

Make WordPress Core

Changeset 350 in tests


Ignore:
Timestamp:
05/12/11 08:34:24 (3 years ago)
Author:
duck_
Message:

Remove more old exthttp and fopen stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_http.php

    r346 r350  
    1919 
    2020        // Disable all transports aside from this one. 
    21         foreach ( array( 'exthttp', 'curl', 'streams', 'fopen', 'fsockopen') as $t ) { 
    22             $filter_name = ($t == 'exthttp') ? 'use_http_extension_transport' : "use_{$t}_transport"; 
    23             remove_filter($filter_name, '__return_false'); // Just strip them all 
     21        foreach ( array( 'curl', 'streams', 'fsockopen' ) as $t ) { 
     22            remove_filter( "use_{$t}_transport", '__return_false' ); // Just strip them all 
    2423            if ( $t != $this->transport ) 
    25                 add_filter($filter_name, '__return_false'); // and add it back if need be.. 
     24                add_filter( "use_{$t}_transport", '__return_false' ); // and add it back if need be.. 
    2625        } 
    2726    } 
     27 
    2828    function tearDown() { 
    29         foreach ( array( 'exthttp', 'curl', 'streams', 'fopen', 'fsockopen') as $t ) { 
    30             $filter_name = ($t == 'exthttp') ? 'use_http_extension_transport' : "use_{$t}_transport"; 
    31             remove_filter($filter_name, '__return_false'); 
     29        foreach ( array( 'curl', 'streams', 'fsockopen' ) as $t ) { 
     30            remove_filter( "use_{$t}_transport", '__return_false' ); 
    3231        } 
    3332    } 
     
    3837        $this->assertEquals(200, (is_wp_error($res) ? 0 : (int)$res['response']['code']) ); 
    3938    } 
     39 
    4040    function test_redirect_on_302() {    
    4141        // 5 : 5 & 302 
     
    4545     
    4646    function test_redirect_on_301_no_redirect() {    
    47         $this->knownWPBug(16855); 
    4847        // 5 > 0 & 301 
    4948        $res = wp_remote_request($this->redirection_script . '?code=301&rt=' . 5, array('redirection' => 0) ); 
     
    5251 
    5352    function test_redirect_on_302_no_redirect() {    
    54         $this->knownWPBug(16855); 
    5553        // 5 > 0 & 302 
    5654        $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) ); 
     
    7169 
    7270    function test_redirect_on_head() { 
    73         $this->knownWPBug(16855); 
    7471        // Redirections on HEAD request when Requested 
    7572        $res = wp_remote_request($this->redirection_script . '?rt=' . 5, array('redirection' => 5, 'method' => 'HEAD') ); 
     
    9693 
    9794    function test_redirections_zero_redirections_specified() { 
    98         $this->knownWPBug(16855); 
    9995        // 0 redirections asked for, Should return the document? 
    10096        $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) ); 
     
    144140        unlink($res['filename']); // Remove the temporary file 
    145141    } 
    146      
    147      
    148142} 
    149143 
Note: See TracChangeset for help on using the changeset viewer.