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

See #38716


git-svn-id: https://develop.svn.wordpress.org/trunk@39174 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2016-11-09 00:01:42 +00:00
parent 5ab2a22a38
commit 61fa0a69d6
10 changed files with 27 additions and 27 deletions

View File

@@ -131,13 +131,13 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
function test_redirections_greater() {
// 10 > 5
$res = wp_remote_request($this->redirection_script . '?rt=' . 10, array('redirection' => 5) );
$this->assertTrue( is_wp_error($res), print_r($res, true) );
$this->assertWPError( $res );
}
function test_redirections_greater_edgecase() {
// 6 > 5 (close edgecase)
$res = wp_remote_request($this->redirection_script . '?rt=' . 6, array('redirection' => 5) );
$this->assertTrue( is_wp_error($res) );
$this->assertWPError( $res );
}
function test_redirections_less_edgecase() {
@@ -387,7 +387,7 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
$this->markTestSkipped( 'This install of PHP does not support SSL' );
$res = wp_remote_get( 'https://wordpress.org/' );
$this->assertTrue( ! is_wp_error( $res ), print_r( $res, true ) );
$this->assertNotWPError( $res );
}
/**