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
This commit is contained in:
Sergey Biryukov 2017-09-29 15:09:39 +00:00
parent 1d022678bb
commit cc08743ec5
1 changed files with 1 additions and 1 deletions

View File

@ -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,
);