mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 14:50:29 +00:00
Build/Test Tools: Implement assertNotWPError() in appropriate places in the test suite.
Props birgire Fixes #42065 git-svn-id: https://develop.svn.wordpress.org/trunk@42863 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -32,7 +32,7 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
|
||||
$_post_data['saveasdraft'] = true;
|
||||
|
||||
$_results = _wp_translate_postdata( false, $_post_data );
|
||||
$this->assertNotInstanceOf( 'WP_Error', $_results );
|
||||
$this->assertNotWPError( $_results );
|
||||
$this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
|
||||
$this->assertEquals( 'draft', $_results['post_status'] );
|
||||
|
||||
@@ -43,7 +43,7 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
|
||||
$_post_data['publish'] = true;
|
||||
|
||||
$_results = _wp_translate_postdata( false, $_post_data );
|
||||
$this->assertNotInstanceOf( 'WP_Error', $_results );
|
||||
$this->assertNotWPError( $_results );
|
||||
$this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
|
||||
$this->assertEquals( 'pending', $_results['post_status'] );
|
||||
|
||||
@@ -82,7 +82,7 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
|
||||
$_post_data['saveasdraft'] = true;
|
||||
|
||||
$_results = _wp_translate_postdata( false, $_post_data );
|
||||
$this->assertNotInstanceOf( 'WP_Error', $_results );
|
||||
$this->assertNotWPError( $_results );
|
||||
$this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
|
||||
$this->assertEquals( 'draft', $_results['post_status'] );
|
||||
|
||||
@@ -93,7 +93,7 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
|
||||
$_post_data['publish'] = true;
|
||||
|
||||
$_results = _wp_translate_postdata( false, $_post_data );
|
||||
$this->assertNotInstanceOf( 'WP_Error', $_results );
|
||||
$this->assertNotWPError( $_results );
|
||||
$this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
|
||||
$this->assertEquals( 'publish', $_results['post_status'] );
|
||||
|
||||
@@ -104,7 +104,7 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
|
||||
$_post_data['saveasdraft'] = true;
|
||||
|
||||
$_results = _wp_translate_postdata( false, $_post_data );
|
||||
$this->assertNotInstanceOf( 'WP_Error', $_results );
|
||||
$this->assertNotWPError( $_results );
|
||||
$this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
|
||||
$this->assertEquals( 'draft', $_results['post_status'] );
|
||||
|
||||
@@ -117,7 +117,7 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
|
||||
$_post_data['saveasdraft'] = true;
|
||||
|
||||
$_results = _wp_translate_postdata( true, $_post_data );
|
||||
$this->assertNotInstanceOf( 'WP_Error', $_results );
|
||||
$this->assertNotWPError( $_results );
|
||||
$this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
|
||||
$this->assertEquals( 'draft', $_results['post_status'] );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user