Skip to content
Permalink
Browse files

Coding Standards: Fix WPCS violations in [45851].

See #25347.

git-svn-id: https://develop.svn.wordpress.org/trunk@45852 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
SergeyBiryukov committed Aug 19, 2019
1 parent 896da17 commit f2b6c12ddb738a86573d40d06825b72dbffd1710
Showing with 12 additions and 8 deletions.
  1. +12 −8 tests/phpunit/tests/post/wpInsertPost.php
@@ -309,17 +309,21 @@ function test_scheduled_post_with_a_past_date_should_be_published() {
$now = new DateTimeImmutable( 'now', new DateTimeZone( 'UTC' ) );
$post_id = $this->factory()->post->create( [
'post_date_gmt' => $now->modify( '-1 year' )->format( 'Y-m-d H:i:s' ),
'post_status' => 'future',
] );
$post_id = $this->factory()->post->create(
array(
'post_date_gmt' => $now->modify( '-1 year' )->format( 'Y-m-d H:i:s' ),
'post_status' => 'future',
)
);
$this->assertEquals( 'publish', get_post_status( $post_id ) );
$post_id = $this->factory()->post->create( [
'post_date_gmt' => $now->modify( '+50 years' )->format( 'Y-m-d H:i:s' ),
'post_status' => 'future',
] );
$post_id = $this->factory()->post->create(
array(
'post_date_gmt' => $now->modify( '+50 years' )->format( 'Y-m-d H:i:s' ),
'post_status' => 'future',
)
);
$this->assertEquals( 'future', get_post_status( $post_id ) );
}

0 comments on commit f2b6c12

Please sign in to comment.
You can’t perform that action at this time.