From 5582e4965cebfe6418b7a3e6534066f794e3912a Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Mon, 18 Jan 2021 03:26:29 +0000 Subject: [PATCH] Tests: Remove references to post status `public`. Replace invalid post status `public` with the valid status `publish`. See #51802. git-svn-id: https://develop.svn.wordpress.org/trunk@49974 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/media.php | 2 +- tests/phpunit/tests/post.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/tests/media.php b/tests/phpunit/tests/media.php index b968b95a51..e7326fec65 100644 --- a/tests/phpunit/tests/media.php +++ b/tests/phpunit/tests/media.php @@ -2449,7 +2449,7 @@ EOF; */ public function test_return_type_when_inserting_attachment_with_error_in_data() { $data = array( - 'post_status' => 'public', + 'post_status' => 'publish', 'post_content' => 'Attachment content', 'post_title' => 'Attachment Title', 'post_date' => '2012-02-30 00:00:00', diff --git a/tests/phpunit/tests/post.php b/tests/phpunit/tests/post.php index effd32eba3..da21a5ee7f 100644 --- a/tests/phpunit/tests/post.php +++ b/tests/phpunit/tests/post.php @@ -403,7 +403,7 @@ class Tests_Post extends WP_UnitTestCase { function test_vb_insert_invalid_date() { $post = array( 'post_author' => self::$editor_id, - 'post_status' => 'public', + 'post_status' => 'publish', 'post_content' => rand_str(), 'post_title' => rand_str(), 'post_date' => '2012-02-30 00:00:00', @@ -785,7 +785,7 @@ class Tests_Post extends WP_UnitTestCase { $title = rand_str(); $post_data = array( 'post_author' => self::$editor_id, - 'post_status' => 'public', + 'post_status' => 'publish', 'post_content' => rand_str(), 'post_title' => $title, 'tax_input' => array( @@ -971,7 +971,7 @@ class Tests_Post extends WP_UnitTestCase { $post_id = self::factory()->post->create( array( 'post_author' => self::$editor_id, - 'post_status' => 'public', + 'post_status' => 'publish', 'post_content' => rand_str(), 'post_title' => rand_str(), ) @@ -989,7 +989,7 @@ class Tests_Post extends WP_UnitTestCase { $post_id = self::factory()->post->create( array( 'post_author' => self::$editor_id, - 'post_status' => 'public', + 'post_status' => 'publish', 'post_content' => rand_str(), 'post_title' => rand_str(), 'post_type' => 'page', @@ -1010,7 +1010,7 @@ class Tests_Post extends WP_UnitTestCase { $post_id = self::factory()->post->create( array( 'post_author' => self::$editor_id, - 'post_status' => 'public', + 'post_status' => 'publish', 'post_content' => rand_str(), 'post_title' => rand_str(), 'post_type' => $post_type, @@ -1032,7 +1032,7 @@ class Tests_Post extends WP_UnitTestCase { $post_id = self::factory()->post->create( array( 'post_author' => self::$editor_id, - 'post_status' => 'public', + 'post_status' => 'publish', 'post_content' => rand_str(), 'post_title' => rand_str(), 'post_type' => $post_type,