Make WordPress Core


Ignore:
Timestamp:
07/08/2019 12:55:20 AM (6 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/user/query.php

    r44373 r45607  
    5454
    5555        $this->assertEquals( '', $users->get( 'fields' ) );
    56         $this->assertEquals( '', @$users->query_vars['fields'] );
     56        if ( isset( $users->query_vars['fields'] ) ) {
     57            $this->assertEquals( '', $users->query_vars['fields'] );
     58        }
    5759
    5860        $users->set( 'fields', 'all' );
     
    11371139        );
    11381140
    1139         $foundCount    = count( $q->get_results() );
    1140         $expectedCount = 10; // 13 total users minus 3 from query
     1141        $found_count    = count( $q->get_results() );
     1142        $expected_count = 10; // 13 total users minus 3 from query
    11411143
    11421144        $this->assertContains( "AND user_nicename NOT IN ( 'peter','paul','mary' )", $q->query_where );
    1143         $this->assertEquals( $expectedCount, $foundCount );
     1145        $this->assertEquals( $expected_count, $found_count );
    11441146    }
    11451147
     
    12381240        );
    12391241
    1240         $foundCount    = count( $q->get_results() );
    1241         $expectedCount = 10; // 13 total users minus 3 from query
     1242        $found_count    = count( $q->get_results() );
     1243        $expected_count = 10; // 13 total users minus 3 from query
    12421244
    12431245        $this->assertContains( "AND user_login NOT IN ( '$user_login1','$user_login2','$user_login3' )", $q->query_where );
    1244         $this->assertEquals( $expectedCount, $foundCount );
     1246        $this->assertEquals( $expected_count, $found_count );
    12451247    }
    12461248
Note: See TracChangeset for help on using the changeset viewer.