Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (6 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/xmlrpc/wp/getPageList.php

    r40417 r42343  
    88
    99    public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
    10         self::$post_id = $factory->post->create( array(
    11             'post_type'   => 'page',
    12             'post_author' => $factory->user->create( array(
    13                 'user_login' => 'author',
    14                 'user_pass'  => 'author',
    15                 'role'       => 'author'
    16             ) ),
    17             'post_date'   => strftime( "%Y-%m-%d %H:%M:%S", strtotime( '+1 day' ) ),
    18         ) );
     10        self::$post_id = $factory->post->create(
     11            array(
     12                'post_type'   => 'page',
     13                'post_author' => $factory->user->create(
     14                    array(
     15                        'user_login' => 'author',
     16                        'user_pass'  => 'author',
     17                        'role'       => 'author',
     18                    )
     19                ),
     20                'post_date'   => strftime( '%Y-%m-%d %H:%M:%S', strtotime( '+1 day' ) ),
     21            )
     22        );
    1923    }
    2024
     
    3943        $this->assertNotIXRError( $results );
    4044
    41         foreach( $results as $result ) {
    42             $page = get_post( $result->page_id );
     45        foreach ( $results as $result ) {
     46            $page     = get_post( $result->page_id );
    4347            $date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $page->post_date, false ), 'Ymd\TH:i:s' ) );
    4448
Note: See TracChangeset for help on using the changeset viewer.