mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user