Skip to content

Commit df45e70

Browse files
Adjust some failing unit tests.
1 parent 7929ba6 commit df45e70

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎tests/phpunit/tests/post/revisions.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,8 @@ public function test_wp_get_post_revisions_should_order_by_post_date() {
539539

540540
$revisions = wp_get_post_revisions( $post['ID'] );
541541

542+
array_unshift( $revision_ids, reset( $revisions )->ID );
543+
542544
$this->assertSame( $revision_ids, array_values( wp_list_pluck( $revisions, 'ID' ) ) );
543545
}
544546

@@ -574,6 +576,8 @@ public function test_wp_get_post_revisions_should_order_by_ID_when_post_date_mat
574576

575577
$revisions = wp_get_post_revisions( $post['ID'] );
576578

579+
array_unshift( $revision_ids, reset( $revisions )->ID );
580+
577581
$this->assertSame( $revision_ids, array_values( wp_list_pluck( $revisions, 'ID' ) ) );
578582
}
579583

‎tests/phpunit/tests/xmlrpc/wp/getRevisions.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function test_revision_count() {
4242

4343
$result = $this->myxmlrpcserver->wp_getRevisions( array( 1, 'editor', 'editor', $post_id ) );
4444
$this->assertIsArray( $result );
45-
$this->assertCount( 1, $result );
45+
$this->assertCount( 2, $result );
4646

4747
wp_insert_post(
4848
array(

0 commit comments

Comments
 (0)