WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (4 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/getRevisions.php

    r40417 r42343  
    2626
    2727        $post_id = self::factory()->post->create();
    28         $result = $this->myxmlrpcserver->wp_getRevisions( array( 1, 'editor', 'editor', $post_id ) );
     28        $result  = $this->myxmlrpcserver->wp_getRevisions( array( 1, 'editor', 'editor', $post_id ) );
    2929        $this->assertNotIXRError( $result );
    3030    }
     
    3434
    3535        $post_id = self::factory()->post->create();
    36         wp_insert_post( array( 'ID' => $post_id, 'post_content' => 'Edit 1' ) ); // Create the initial revision
     36        wp_insert_post(
     37            array(
     38                'ID'           => $post_id,
     39                'post_content' => 'Edit 1',
     40            )
     41        ); // Create the initial revision
    3742
    3843        $result = $this->myxmlrpcserver->wp_getRevisions( array( 1, 'editor', 'editor', $post_id ) );
     
    4045        $this->assertCount( 1, $result );
    4146
    42         wp_insert_post( array( 'ID' => $post_id, 'post_content' => 'Edit 2' ) );
     47        wp_insert_post(
     48            array(
     49                'ID'           => $post_id,
     50                'post_content' => 'Edit 2',
     51            )
     52        );
    4353
    4454        $result = $this->myxmlrpcserver->wp_getRevisions( array( 1, 'editor', 'editor', $post_id ) );
     
    5363        $this->make_user_by_role( 'editor' );
    5464
    55         $post_id = $this->myxmlrpcserver->wp_newPost( array( 1, 'editor', 'editor', array(
    56             'post_title' => 'Original title',
    57             'post_content' => 'Test'
    58         ) ) );
     65        $post_id = $this->myxmlrpcserver->wp_newPost(
     66            array(
     67                1,
     68                'editor',
     69                'editor',
     70                array(
     71                    'post_title'   => 'Original title',
     72                    'post_content' => 'Test',
     73                ),
     74            )
     75        );
    5976
    6077        $result = $this->myxmlrpcserver->wp_getRevisions( array( 1, 'editor', 'editor', $post_id ) );
Note: See TracChangeset for help on using the changeset viewer.