WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/08/2019 12:55:20 AM (2 years ago)
Author:
pento
Message:

Coding Standards: Fix the remaining issues in /tests.

All PHP files in /tests now conform to the PHP coding standards, or have exceptions appropriately marked.

Travis now also runs phpcs on the /tests directory, any future changes to these files must conform entirely to the WordPress PHP coding standards. 🎉

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/thumbnails.php

    r43571 r45607  
    7272        set_post_thumbnail( self::$post, self::$attachment_id );
    7373
    74         $WP_Query = new WP_Query(
     74        $query = new WP_Query(
    7575            array(
    7676                'post_type' => 'any',
     
    8080        );
    8181
    82         $this->assertFalse( $WP_Query->thumbnails_cached );
    83 
    84         update_post_thumbnail_cache( $WP_Query );
    85 
    86         $this->assertTrue( $WP_Query->thumbnails_cached );
     82        $this->assertFalse( $query->thumbnails_cached );
     83
     84        update_post_thumbnail_cache( $query );
     85
     86        $this->assertTrue( $query->thumbnails_cached );
    8787    }
    8888
     
    393393        );
    394394
    395         $post = $which_post === 1 ? self::$different_post : self::$post;
     395        $post = 1 === $which_post ? self::$different_post : self::$post;
    396396
    397397        add_filter( 'post_thumbnail_size', array( $this, 'filter_post_thumbnail_size' ), 10, 2 );
Note: See TracChangeset for help on using the changeset viewer.