From cc08743ec50c4270f973cc6b4652a13de2b46d7c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 29 Sep 2017 15:09:39 +0000 Subject: [PATCH] Posts, Post Types: Correct `test_submitting_comment_to_trashed_post_returns_error()`. `wp_trash_post()` accepts a post ID, not a `WP_Post` object. See #42030. git-svn-id: https://develop.svn.wordpress.org/trunk@41644 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/comment-submission.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/comment-submission.php b/tests/phpunit/tests/comment-submission.php index f2342332f1..3ee24df6f1 100644 --- a/tests/phpunit/tests/comment-submission.php +++ b/tests/phpunit/tests/comment-submission.php @@ -55,7 +55,7 @@ class Tests_Comment_Submission extends WP_UnitTestCase { $this->assertSame( 0, did_action( $error ) ); $post = self::factory()->post->create_and_get(); - wp_trash_post( $post ); + wp_trash_post( $post->ID ); $data = array( 'comment_post_ID' => $post->ID, );