Make WordPress Core

Ticket #56681: 56681.diff

File 56681.diff, 841 bytes (added by SergeyBiryukov, 2 years ago)
  • tests/phpunit/tests/rest-api/rest-posts-controller.php

     
    19771977                $request->set_param( 'context', 'edit' );
    19781978                $response = rest_get_server()->dispatch( $request );
    19791979                $data     = $response->get_data();
     1980                /*
     1981                 * Authenticated users should only be allowed to read the content of password protected posts
     1982                 * if they have the 'edit_post' meta capability for the post. In other words, the content
     1983                 * of a password protected post created by an Editor should not be viewable by a Contributor.
     1984                 */
    19801985                $this->assertStringNotContainsString( $post_content, $data['content']['rendered'] );
    19811986        }
    19821987