Make WordPress Core


Ignore:
Timestamp:
11/29/2022 12:32:37 PM (23 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Add visibility to methods in tests/phpunit/tests/.

Adds a public visibility to test fixtures, tests, data providers, and callbacks methods. This continues the previous efforts to make sure visibility is declared on all methods.

Note: This will be enforced by WPCS 3.0.0.

Follow-up to [51919], [52009], [52010].

Props jrf.
See #56791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/renderCommentTemplate.php

    r53430 r54889  
    8888     * @covers ::build_comment_query_vars_from_block
    8989     */
    90     function test_build_comment_query_vars_from_block_with_context() {
     90    public function test_build_comment_query_vars_from_block_with_context() {
    9191        $parsed_blocks = parse_blocks(
    9292            '<!-- wp:comment-template --><!-- wp:comment-author-name /--><!-- wp:comment-content /--><!-- /wp:comment-template -->'
     
    119119     * @covers ::build_comment_query_vars_from_block
    120120     */
    121     function test_build_comment_query_vars_from_block_with_context_no_pagination() {
     121    public function test_build_comment_query_vars_from_block_with_context_no_pagination() {
    122122        update_option( 'page_comments', false );
    123123        $parsed_blocks = parse_blocks(
     
    149149     * @covers ::build_comment_query_vars_from_block
    150150     */
    151     function test_build_comment_query_vars_from_block_no_context() {
     151    public function test_build_comment_query_vars_from_block_no_context() {
    152152        $parsed_blocks = parse_blocks(
    153153            '<!-- wp:comment-template --><!-- wp:comment-author-name /--><!-- wp:comment-content /--><!-- /wp:comment-template -->'
     
    179179     * @covers ::build_comment_query_vars_from_block
    180180     */
    181     function test_build_comment_query_vars_from_block_pagination_with_no_comments() {
     181    public function test_build_comment_query_vars_from_block_pagination_with_no_comments() {
    182182        $comments_per_page     = get_option( 'comments_per_page' );
    183183        $default_comments_page = get_option( 'default_comments_page' );
     
    231231     * @covers ::build_comment_query_vars_from_block
    232232     */
    233     function test_build_comment_query_vars_from_block_sets_cpage_var() {
     233    public function test_build_comment_query_vars_from_block_sets_cpage_var() {
    234234
    235235        // This could be any number, we set a fixed one instead of a random for better performance.
     
    268268     * @ticket 55567
    269269     */
    270     function test_rendering_comment_template() {
     270    public function test_rendering_comment_template() {
    271271        $parsed_blocks = parse_blocks(
    272272            '<!-- wp:comment-template --><!-- wp:comment-author-name /--><!-- wp:comment-content /--><!-- /wp:comment-template -->'
     
    296296     * @ticket 55567
    297297     */
    298     function test_rendering_comment_template_nested() {
     298    public function test_rendering_comment_template_nested() {
    299299        $first_level_ids = self::factory()->comment->create_post_comments(
    300300            self::$custom_post->ID,
     
    397397     * @ticket 55643
    398398     */
    399     function test_render_block_core_comment_content_converts_to_html() {
     399    public function test_render_block_core_comment_content_converts_to_html() {
    400400        $comment_id  = self::$comment_ids[0];
    401401        $new_content = "Paragraph One\n\nP2L1\nP2L2\n\nhttps://example.com/";
     
    431431     * @covers ::build_comment_query_vars_from_block
    432432     */
    433     function test_build_comment_query_vars_from_block_with_comment_preview() {
     433    public function test_build_comment_query_vars_from_block_with_comment_preview() {
    434434        $parsed_blocks = parse_blocks(
    435435            '<!-- wp:comment-template --><!-- wp:comment-author-name /--><!-- wp:comment-content /--><!-- /wp:comment-template -->'
     
    472472     * @ticket 55643
    473473     */
    474     function test_rendering_comment_template_unmoderated_preview() {
     474    public function test_rendering_comment_template_unmoderated_preview() {
    475475        $parsed_blocks = parse_blocks(
    476476            '<!-- wp:comment-template --><!-- wp:comment-author-name /--><!-- wp:comment-content /--><!-- /wp:comment-template -->'
Note: See TracChangeset for help on using the changeset viewer.