Make WordPress Core

Ticket #44939: 44939.diff

File 44939.diff, 2.0 KB (added by andizer, 7 years ago)
  • tests/phpunit/tests/rest-api/rest-server.php

     
    197197         * Pass a capability which the user does not have, this should
    198198         * result in a 403 error.
    199199         */
    200         function test_rest_route_capability_authorization_fails() {
     200        public function test_rest_route_capability_authorization_fails() {
    201201                register_rest_route(
    202202                        'test-ns', '/test', array(
    203203                                'methods'             => 'GET',
     
    217217         * An editor should be able to get access to an route with the
    218218         * edit_posts capability.
    219219         */
    220         function test_rest_route_capability_authorization() {
     220        public function test_rest_route_capability_authorization() {
    221221                register_rest_route(
    222222                        'test-ns', '/test', array(
    223223                                'methods'             => 'GET',
     
    242242         * An "Allow" HTTP header should be sent with a request
    243243         * for all available methods on that route.
    244244         */
    245         function test_allow_header_sent() {
     245        public function test_allow_header_sent() {
    246246
    247247                register_rest_route(
    248248                        'test-ns', '/test', array(
     
    267267         * The "Allow" HTTP header should include all available
    268268         * methods that can be sent to a route.
    269269         */
    270         function test_allow_header_sent_with_multiple_methods() {
     270        public function test_allow_header_sent_with_multiple_methods() {
    271271
    272272                register_rest_route(
    273273                        'test-ns', '/test', array(
     
    301301         * The "Allow" HTTP header should NOT include other methods
    302302         * which the user does not have access to.
    303303         */
    304         function test_allow_header_send_only_permitted_methods() {
     304        public function test_allow_header_send_only_permitted_methods() {
    305305
    306306                register_rest_route(
    307307                        'test-ns', '/test', array(
     
    11061106         *     }
    11071107         * }
    11081108         */
    1109         function data_rest_send_refreshed_nonce() {
     1109        public function data_rest_send_refreshed_nonce() {
    11101110                return array(
    11111111                        array( true, true ),
    11121112                        array( true, false ),