Skip to content

Commit

Permalink
Tests: Update unit tests after changes to `build_comment_query_vars_f…
Browse files Browse the repository at this point in the history
…rom_block`
  • Loading branch information
gziolo committed Apr 19, 2022
1 parent f345992 commit 1e06cba
Showing 1 changed file with 21 additions and 24 deletions.
45 changes: 21 additions & 24 deletions phpunit/class-block-library-comment-template-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,12 @@ function test_build_comment_query_vars_from_block_with_context_no_pagination() {
$this->assertEquals(
build_comment_query_vars_from_block( $block ),
array(
'orderby' => 'comment_date_gmt',
'order' => 'ASC',
'status' => 'approve',
'no_found_rows' => false,
'update_comment_meta_cache' => false,
'post_id' => self::$custom_post->ID,
'hierarchical' => 'threaded',
'orderby' => 'comment_date_gmt',
'order' => 'ASC',
'status' => 'approve',
'no_found_rows' => false,
'post_id' => self::$custom_post->ID,
'hierarchical' => 'threaded',
)
);
update_option( 'page_comments', true );
Expand All @@ -88,15 +87,14 @@ function test_build_comment_query_vars_from_block_with_context() {
$this->assertEquals(
build_comment_query_vars_from_block( $block ),
array(
'orderby' => 'comment_date_gmt',
'order' => 'ASC',
'status' => 'approve',
'no_found_rows' => false,
'update_comment_meta_cache' => false,
'post_id' => self::$custom_post->ID,
'hierarchical' => 'threaded',
'number' => 5,
'paged' => 1,
'orderby' => 'comment_date_gmt',
'order' => 'ASC',
'status' => 'approve',
'no_found_rows' => false,
'post_id' => self::$custom_post->ID,
'hierarchical' => 'threaded',
'number' => 5,
'paged' => 1,
)
);
}
Expand All @@ -111,14 +109,13 @@ function test_build_comment_query_vars_from_block_no_context() {
$this->assertEquals(
build_comment_query_vars_from_block( $block ),
array(
'orderby' => 'comment_date_gmt',
'order' => 'ASC',
'status' => 'approve',
'no_found_rows' => false,
'update_comment_meta_cache' => false,
'hierarchical' => 'threaded',
'number' => 5,
'paged' => 1,
'orderby' => 'comment_date_gmt',
'order' => 'ASC',
'status' => 'approve',
'no_found_rows' => false,
'hierarchical' => 'threaded',
'number' => 5,
'paged' => 1,
)
);
}
Expand Down

0 comments on commit 1e06cba

Please sign in to comment.