Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (8 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

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

    r38961 r42343  
    2121
    2222    public function test_get_weekday() {
    23         $this->assertEquals( __( 'Sunday' ),    $this->locale->get_weekday( 0 ) );
    24         $this->assertEquals( __( 'Monday' ),    $this->locale->get_weekday( 1 ) );
    25         $this->assertEquals( __( 'Tuesday' ),   $this->locale->get_weekday( 2 ) );
     23        $this->assertEquals( __( 'Sunday' ), $this->locale->get_weekday( 0 ) );
     24        $this->assertEquals( __( 'Monday' ), $this->locale->get_weekday( 1 ) );
     25        $this->assertEquals( __( 'Tuesday' ), $this->locale->get_weekday( 2 ) );
    2626        $this->assertEquals( __( 'Wednesday' ), $this->locale->get_weekday( 3 ) );
    27         $this->assertEquals( __( 'Thursday' ),  $this->locale->get_weekday( 4 ) );
    28         $this->assertEquals( __( 'Friday' ),    $this->locale->get_weekday( 5 ) );
    29         $this->assertEquals( __( 'Saturday' ),  $this->locale->get_weekday( 6 ) );
     27        $this->assertEquals( __( 'Thursday' ), $this->locale->get_weekday( 4 ) );
     28        $this->assertEquals( __( 'Friday' ), $this->locale->get_weekday( 5 ) );
     29        $this->assertEquals( __( 'Saturday' ), $this->locale->get_weekday( 6 ) );
    3030    }
    3131
     
    5858
    5959    public function test_get_month() {
    60         $this->assertEquals( __( 'January' ),   $this->locale->get_month( 1 ) );
    61         $this->assertEquals( __( 'February' ),  $this->locale->get_month( 2 ) );
    62         $this->assertEquals( __( 'March' ),     $this->locale->get_month( 3 ) );
    63         $this->assertEquals( __( 'April' ),     $this->locale->get_month( 4 ) );
    64         $this->assertEquals( __( 'May' ),       $this->locale->get_month( 5 ) );
    65         $this->assertEquals( __( 'June' ),      $this->locale->get_month( 6 ) );
    66         $this->assertEquals( __( 'July' ),      $this->locale->get_month( 7 ) );
    67         $this->assertEquals( __( 'August' ),    $this->locale->get_month( 8 ) );
     60        $this->assertEquals( __( 'January' ), $this->locale->get_month( 1 ) );
     61        $this->assertEquals( __( 'February' ), $this->locale->get_month( 2 ) );
     62        $this->assertEquals( __( 'March' ), $this->locale->get_month( 3 ) );
     63        $this->assertEquals( __( 'April' ), $this->locale->get_month( 4 ) );
     64        $this->assertEquals( __( 'May' ), $this->locale->get_month( 5 ) );
     65        $this->assertEquals( __( 'June' ), $this->locale->get_month( 6 ) );
     66        $this->assertEquals( __( 'July' ), $this->locale->get_month( 7 ) );
     67        $this->assertEquals( __( 'August' ), $this->locale->get_month( 8 ) );
    6868        $this->assertEquals( __( 'September' ), $this->locale->get_month( 9 ) );
    69         $this->assertEquals( __( 'October' ),   $this->locale->get_month( 10 ) );
    70         $this->assertEquals( __( 'November' ),  $this->locale->get_month( 11 ) );
    71         $this->assertEquals( __( 'December' ),  $this->locale->get_month( 12 ) );
     69        $this->assertEquals( __( 'October' ), $this->locale->get_month( 10 ) );
     70        $this->assertEquals( __( 'November' ), $this->locale->get_month( 11 ) );
     71        $this->assertEquals( __( 'December' ), $this->locale->get_month( 12 ) );
    7272    }
    7373
    7474    public function test_get_month_leading_zero() {
    75         $this->assertEquals( __( 'January' ),   $this->locale->get_month( '01' ) );
    76         $this->assertEquals( __( 'February' ),  $this->locale->get_month( '02' ) );
    77         $this->assertEquals( __( 'March' ),     $this->locale->get_month( '03' ) );
    78         $this->assertEquals( __( 'April' ),     $this->locale->get_month( '04' ) );
    79         $this->assertEquals( __( 'May' ),       $this->locale->get_month( '05' ) );
    80         $this->assertEquals( __( 'June' ),      $this->locale->get_month( '06' ) );
    81         $this->assertEquals( __( 'July' ),      $this->locale->get_month( '07' ) );
    82         $this->assertEquals( __( 'August' ),    $this->locale->get_month( '08' ) );
     75        $this->assertEquals( __( 'January' ), $this->locale->get_month( '01' ) );
     76        $this->assertEquals( __( 'February' ), $this->locale->get_month( '02' ) );
     77        $this->assertEquals( __( 'March' ), $this->locale->get_month( '03' ) );
     78        $this->assertEquals( __( 'April' ), $this->locale->get_month( '04' ) );
     79        $this->assertEquals( __( 'May' ), $this->locale->get_month( '05' ) );
     80        $this->assertEquals( __( 'June' ), $this->locale->get_month( '06' ) );
     81        $this->assertEquals( __( 'July' ), $this->locale->get_month( '07' ) );
     82        $this->assertEquals( __( 'August' ), $this->locale->get_month( '08' ) );
    8383        $this->assertEquals( __( 'September' ), $this->locale->get_month( '09' ) );
    8484    }
Note: See TracChangeset for help on using the changeset viewer.