Make WordPress Core


Ignore:
Timestamp:
11/09/2016 12:01:42 AM (8 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Utilise assertWPError() and assertNotWPError() in more places.

See #38716

File:
1 edited

Legend:

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

    r38757 r39174  
    132132        // 10 > 5
    133133        $res = wp_remote_request($this->redirection_script . '?rt=' . 10, array('redirection' => 5) );
    134         $this->assertTrue( is_wp_error($res), print_r($res, true) );
     134        $this->assertWPError( $res );
    135135    }
    136136
     
    138138        // 6 > 5 (close edgecase)
    139139        $res = wp_remote_request($this->redirection_script . '?rt=' . 6, array('redirection' => 5) );
    140         $this->assertTrue( is_wp_error($res) );
     140        $this->assertWPError( $res );
    141141    }
    142142
     
    388388
    389389        $res = wp_remote_get( 'https://wordpress.org/' );
    390         $this->assertTrue( ! is_wp_error( $res ), print_r( $res, true ) );
     390        $this->assertNotWPError( $res );
    391391    }
    392392
Note: See TracChangeset for help on using the changeset viewer.