Changeset 38758 for trunk/tests/phpunit/tests/http/functions.php
- Timestamp:
- 10/08/2016 01:02:40 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/functions.php
r38164 r38758 20 20 $headers = wp_remote_retrieve_headers( $response ); 21 21 22 $this->assertInternalType( 'array', $response ); 23 22 24 $this->assertEquals( 'image/jpeg', $headers['content-type'] ); 23 25 $this->assertEquals( '40148', $headers['content-length'] ); 24 26 $this->assertEquals( '200', wp_remote_retrieve_response_code( $response ) ); 25 }26 27 /**28 * @depends test_head_request29 */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 );34 27 } 35 28 … … 54 47 $headers = wp_remote_retrieve_headers( $response ); 55 48 49 $this->assertInternalType( 'array', $response ); 50 56 51 // should return the same headers as a head request 57 52 $this->assertEquals( 'image/jpeg', $headers['content-type'] );
Note: See TracChangeset
for help on using the changeset viewer.