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/attachment/slashes.php

    r49003 r49004  
    3333     */
    3434    function test_wp_insert_attachment() {
    35         $id  = wp_insert_attachment(
     35        $post_id = wp_insert_attachment(
    3636            array(
    3737                'post_status'           => 'publish',
     
    4242            )
    4343        );
    44         $post = get_post( $id );
     44        $post    = get_post( $post_id );
    4545
    4646        $this->assertSame( wp_unslash( $this->slash_1 ), $post->post_title );
     
    4848        $this->assertSame( wp_unslash( $this->slash_5 ), $post->post_excerpt );
    4949
    50         $id  = wp_insert_attachment(
     50        $post_id = wp_insert_attachment(
    5151            array(
    5252                'post_status'           => 'publish',
     
    5757            )
    5858        );
    59         $post = get_post( $id );
     59        $post    = get_post( $post_id );
    6060
    6161        $this->assertSame( wp_unslash( $this->slash_2 ), $post->post_title );
Note: See TracChangeset for help on using the changeset viewer.