From 6de34b11c41145ace5dcd02e9583ac7c7e46680a Mon Sep 17 00:00:00 2001 From: rishishah-multidots Date: Fri, 4 Oct 2024 16:58:59 +0530 Subject: [PATCH] add comment test cases changes for allow custom comment type --- tests/phpunit/tests/rest-api/rest-comments-controller.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/rest-api/rest-comments-controller.php b/tests/phpunit/tests/rest-api/rest-comments-controller.php index ee42906c61796..cdda50e2bf94b 100644 --- a/tests/phpunit/tests/rest-api/rest-comments-controller.php +++ b/tests/phpunit/tests/rest-api/rest-comments-controller.php @@ -1592,7 +1592,8 @@ public function test_create_comment_with_invalid_type() { $request->set_body( wp_json_encode( $params ) ); $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_invalid_comment_type', $response, 400 ); + $this->assertFalse( is_wp_error( $response ) ); + $this->assertEquals( $response['code'], 400 ); } public function test_create_comment_invalid_email() {