Skip to content

Commit

Permalink
Fix the unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-vlasenko committed Dec 30, 2024
1 parent 7f80fbb commit 5eb42b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/phpunit/tests/rest-api/wpRestTemplatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public function test_get_item() {
*/
public function test_get_item_should_return_no_response_body_for_head_requests() {
wp_set_current_user( self::$admin_id );
$request = new WP_REST_Request( 'GET', '/wp/v2/templates/default//my_template' );
$request = new WP_REST_Request( 'HEAD', '/wp/v2/templates/default//my_template' );
$response = rest_get_server()->dispatch( $request );
$this->assertSame( 200, $response->get_status(), 'Response status is 200.' );
$this->assertNull( $response->get_data(), 'The server should not generate a body in response to a HEAD request.' );
Expand Down

0 comments on commit 5eb42b9

Please sign in to comment.