Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve phpcs error in unit test file #58

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/compat/wordpress-6.7/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,8 @@ function update_comment_type_in_rest_api_6_7( $prepared_comment, $request ) {
*/
if ( ! function_exists( 'update_get_avatar_comment_type' ) && gutenberg_is_experiment_enabled( 'gutenberg-block-comment' ) ) {
function update_get_avatar_comment_type( $comment_type ) {

$comment_type[] = 'block_comment';
return $comment_type;

}
add_filter( 'get_avatar_comment_types', 'update_get_avatar_comment_type', 10, 1 );
}
Expand All @@ -169,7 +167,7 @@ function update_get_avatar_comment_type( $comment_type ) {
if ( ! function_exists( 'update_comment_type_filter_dropdown' ) && gutenberg_is_experiment_enabled( 'gutenberg-block-comment' ) ) {
function update_comment_type_filter_dropdown() {
return array(
'comment' => __( 'Comments' ),
'comment' => __( 'Comments' ),
'block_comment' => __( 'Block Comments' ),
);
}
Expand Down
2 changes: 1 addition & 1 deletion phpunit/class-block-comment-filter-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function test_update_get_avatar_comment_type() {

// Assertions
$this->assertContains( 'block_comment', $updated_comment_types );
}
}

/**
* Tests that `update_comment_type_filter_dropdown` returns the correct options.
Expand Down
Loading