WordPress.org

Make WordPress Core

Changeset 485 in tests


Ignore:
Timestamp:
12/16/2011 04:05:57 AM (6 years ago)
Author:
markjaquith
Message:

Make sure the HTTP request did not fail outright.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_http.php

    r407 r485  
    138138        $res = wp_remote_request( $url, array( 'stream' => true, 'timeout' => 30 ) ); //Auto generate the filename.
    139139
     140        $this->assertFalse( is_wp_error( $res ) );
    140141        $this->assertEquals( '', $res['body'] ); // The body should be empty.
    141142        $this->assertEquals( $size, $res['headers']['content-length'] ); // Check the headers are returned (and the size is the same..)
Note: See TracChangeset for help on using the changeset viewer.