From fc0ed5e1cae0d3783ac70079dfe13f9e31fe230d Mon Sep 17 00:00:00 2001 From: Joe Hoyle Date: Thu, 3 Mar 2016 11:37:48 +0000 Subject: [PATCH] REST API: Unit test for OPTIONS request should call rest_send_allow_header In [36829] we moved this logic to rest_send_allow_header() See #36829. git-svn-id: https://develop.svn.wordpress.org/trunk@36831 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/rest-api.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/rest-api.php b/tests/phpunit/tests/rest-api.php index 392fe5d4cb..0c6d22e41d 100644 --- a/tests/phpunit/tests/rest-api.php +++ b/tests/phpunit/tests/rest-api.php @@ -245,11 +245,11 @@ class Tests_REST_API extends WP_UnitTestCase { $request = new WP_REST_Request( 'OPTIONS', '/test-ns/test' ); $response = rest_handle_options_request( null, $GLOBALS['wp_rest_server'], $request ); - + $response = rest_send_allow_header( $response, $GLOBALS['wp_rest_server'], $request ); $headers = $response->get_headers(); - $this->assertArrayHasKey( 'Accept', $headers ); + $this->assertArrayHasKey( 'Allow', $headers ); - $this->assertEquals( 'GET, POST', $headers['Accept'] ); + $this->assertEquals( 'GET, POST', $headers['Allow'] ); } /**