Make WordPress Core


Ignore:
Timestamp:
01/12/2019 06:05:55 AM (6 years ago)
Author:
pento
Message:

Coding Standards: Fix and whitelist variable names.

From the WordPress.NamingConventions.ValidVariableName sniff, this commit fixes/whitelists all NotSnakeCaseMemberVar, MemberNotSnakeCase, and StringNotSnakeCase violations. It also fixes a handful of the NotSnakeCase violations.

See #45934.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/avatar.php

    r44499 r44573  
    104104    }
    105105
    106     protected $fakeURL;
     106    protected $fake_url;
    107107    /**
    108108     * @ticket 21195
    109109     */
    110110    public function test_pre_get_avatar_url_filter() {
    111         $this->fakeURL = 'haha wat';
     111        $this->fake_url = 'haha wat';
    112112
    113113        add_filter( 'pre_get_avatar_data', array( $this, 'pre_get_avatar_url_filter' ), 10, 1 );
     
    115115        remove_filter( 'pre_get_avatar_data', array( $this, 'pre_get_avatar_url_filter' ), 10 );
    116116
    117         $this->assertEquals( $url, $this->fakeURL );
     117        $this->assertEquals( $url, $this->fake_url );
    118118    }
    119119    public function pre_get_avatar_url_filter( $args ) {
    120         $args['url'] = $this->fakeURL;
     120        $args['url'] = $this->fake_url;
    121121        return $args;
    122122    }
     
    126126     */
    127127    public function test_get_avatar_url_filter() {
    128         $this->fakeURL = 'omg lol';
     128        $this->fake_url = 'omg lol';
    129129
    130130        add_filter( 'get_avatar_url', array( $this, 'get_avatar_url_filter' ), 10, 1 );
     
    132132        remove_filter( 'get_avatar_url', array( $this, 'get_avatar_url_filter' ), 10 );
    133133
    134         $this->assertEquals( $url, $this->fakeURL );
     134        $this->assertEquals( $url, $this->fake_url );
    135135    }
    136136    public function get_avatar_url_filter( $url ) {
    137         return $this->fakeURL;
     137        return $this->fake_url;
    138138    }
    139139
     
    208208
    209209
    210     protected $fakeIMG;
     210    protected $fake_img;
    211211    /**
    212212     * @ticket 21195
    213213     */
    214214    public function test_pre_get_avatar_filter() {
    215         $this->fakeIMG = 'YOU TOO?!';
     215        $this->fake_img = 'YOU TOO?!';
    216216
    217217        add_filter( 'pre_get_avatar', array( $this, 'pre_get_avatar_filter' ), 10, 1 );
     
    219219        remove_filter( 'pre_get_avatar', array( $this, 'pre_get_avatar_filter' ), 10 );
    220220
    221         $this->assertEquals( $img, $this->fakeIMG );
     221        $this->assertEquals( $img, $this->fake_img );
    222222    }
    223223    public function pre_get_avatar_filter( $img ) {
    224         return $this->fakeIMG;
     224        return $this->fake_img;
    225225    }
    226226
     
    229229     */
    230230    public function test_get_avatar_filter() {
    231         $this->fakeURL = 'YA RLY';
     231        $this->fake_url = 'YA RLY';
    232232
    233233        add_filter( 'get_avatar', array( $this, 'get_avatar_filter' ), 10, 1 );
     
    235235        remove_filter( 'get_avatar', array( $this, 'get_avatar_filter' ), 10 );
    236236
    237         $this->assertEquals( $img, $this->fakeURL );
     237        $this->assertEquals( $img, $this->fake_url );
    238238    }
    239239    public function get_avatar_filter( $img ) {
    240         return $this->fakeURL;
     240        return $this->fake_url;
    241241    }
    242242
Note: See TracChangeset for help on using the changeset viewer.