WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/19/2020 10:53:15 AM (13 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Give the $id variable in slashed data tests a more descriptive name.

See #50767, #51344.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment/slashes.php

    r49003 r49004  
    3838        // Not testing comment_author_email or comment_author_url
    3939        // as slashes are not permitted in that data.
    40         $data = array(
     40        $data       = array(
    4141            'comment_post_ID'      => $post_id,
    4242            'comment_author'       => $this->slash_1,
     
    4646            'comment_content'      => $this->slash_7,
    4747        );
    48         $id  = wp_new_comment( $data );
     48        $comment_id = wp_new_comment( $data );
    4949
    50         $comment = get_comment( $id );
     50        $comment = get_comment( $comment_id );
    5151
    5252        $this->assertSame( wp_unslash( $this->slash_1 ), $comment->comment_author );
    5353        $this->assertSame( wp_unslash( $this->slash_7 ), $comment->comment_content );
    5454
    55         $data = array(
     55        $data       = array(
    5656            'comment_post_ID'      => $post_id,
    5757            'comment_author'       => $this->slash_2,
     
    6161            'comment_content'      => $this->slash_4,
    6262        );
    63         $id  = wp_new_comment( $data );
     63        $comment_id = wp_new_comment( $data );
    6464
    65         $comment = get_comment( $id );
     65        $comment = get_comment( $comment_id );
    6666
    6767        $this->assertSame( wp_unslash( $this->slash_2 ), $comment->comment_author );
Note: See TracChangeset for help on using the changeset viewer.