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/pomo/pluralForms.php

    r42343 r45607  
    6161        foreach ( $locales as $slug => $locale ) {
    6262            $plural_expression = $locale->plural_expression;
    63             if ( $plural_expression !== 'n != 1' ) {
     63            if ( 'n != 1' !== $plural_expression ) {
    6464                $plural_expressions[] = array( $slug, $locale->nplurals, $plural_expression );
    6565            }
     
    8383        $parenthesized = self::parenthesize_plural_expression( $expression );
    8484        $old_style     = tests_make_plural_form_function( $nplurals, $parenthesized );
    85         $pluralForms   = new Plural_Forms( $expression );
     85        $plural_forms  = new Plural_Forms( $expression );
    8686
    8787        $generated_old = array();
     
    9090        foreach ( range( 0, 200 ) as $i ) {
    9191            $generated_old[] = $old_style( $i );
    92             $generated_new[] = $pluralForms->get( $i );
     92            $generated_new[] = $plural_forms->get( $i );
    9393        }
    9494
     
    152152     */
    153153    public function test_simple( $expression, $expected ) {
    154         $pluralForms = new Plural_Forms( $expression );
    155         $actual      = array();
     154        $plural_forms = new Plural_Forms( $expression );
     155        $actual       = array();
    156156        foreach ( array_keys( $expected ) as $num ) {
    157             $actual[ $num ] = $pluralForms->get( $num );
     157            $actual[ $num ] = $plural_forms->get( $num );
    158158        }
    159159
     
    213213    public function test_exceptions( $expression, $expected_exception, $call_get ) {
    214214        try {
    215             $pluralForms = new Plural_Forms( $expression );
     215            $plural_forms = new Plural_Forms( $expression );
    216216            if ( $call_get ) {
    217                 $pluralForms->get( 1 );
     217                $plural_forms->get( 1 );
    218218            }
    219219        } catch ( Exception $e ) {
Note: See TracChangeset for help on using the changeset viewer.