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

@@ -381,7 +381,7 @@ class Tests_Post extends WP_UnitTestCase {
// Test both return paths with or without WP_Error
$insert_post = wp_insert_post( $post, true );
$this->assertTrue( is_wp_error( $insert_post ), 'Did not get a WP_Error back from wp_insert_post' );
$this->assertWPError( $insert_post );
$this->assertEquals( 'invalid_date', $insert_post->get_error_code() );
$insert_post = wp_insert_post( $post );