WordPress.org

Make WordPress Core

Changeset 38758


Ignore:
Timestamp:
10/08/16 01:02:40 (11 months ago)
Author:
johnbillion
Message:

HTTP API: Remove an unnecessary duplicate HTTP request in the HTTP tests.

See #30017

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/http/functions.php

    r38164 r38758  
    2020        $headers = wp_remote_retrieve_headers( $response ); 
    2121 
     22        $this->assertInternalType( 'array', $response ); 
     23         
    2224        $this->assertEquals( 'image/jpeg', $headers['content-type'] ); 
    2325        $this->assertEquals( '40148', $headers['content-length'] ); 
    2426        $this->assertEquals( '200', wp_remote_retrieve_response_code( $response ) ); 
    25     } 
    26  
    27     /** 
    28      * @depends test_head_request 
    29      */ 
    30     function test_returns_array() { 
    31         $url = 'https://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg'; 
    32         $response = wp_remote_head( $url ); 
    33         $this->assertInternalType( 'array', $response ); 
    3427    } 
    3528 
     
    5447        $headers = wp_remote_retrieve_headers( $response ); 
    5548 
     49        $this->assertInternalType( 'array', $response ); 
     50     
    5651        // should return the same headers as a head request 
    5752        $this->assertEquals( 'image/jpeg', $headers['content-type'] ); 
Note: See TracChangeset for help on using the changeset viewer.