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/ajax/QuickEdit.php

    r37954 r42343  
    1717     */
    1818    public function test_dont_process_terms_if_taxonomy_does_not_allow_show_on_quick_edit() {
    19         register_taxonomy( 'wptests_tax_1', 'post', array(
    20             'show_in_quick_edit' => false,
    21             'hierarchical' => true,
    22         ) );
    23         register_taxonomy( 'wptests_tax_2', 'post', array(
    24             'show_in_quick_edit' => true,
    25             'hierarchical' => true,
    26         ) );
     19        register_taxonomy(
     20            'wptests_tax_1', 'post', array(
     21                'show_in_quick_edit' => false,
     22                'hierarchical'       => true,
     23            )
     24        );
     25        register_taxonomy(
     26            'wptests_tax_2', 'post', array(
     27                'show_in_quick_edit' => true,
     28                'hierarchical'       => true,
     29            )
     30        );
    2731
    28         $t1 = self::factory()->term->create( array(
    29             'taxonomy' => 'wptests_tax_1',
    30         ) );
    31         $t2 = self::factory()->term->create( array(
    32             'taxonomy' => 'wptests_tax_2',
    33         ) );
     32        $t1 = self::factory()->term->create(
     33            array(
     34                'taxonomy' => 'wptests_tax_1',
     35            )
     36        );
     37        $t2 = self::factory()->term->create(
     38            array(
     39                'taxonomy' => 'wptests_tax_2',
     40            )
     41        );
    3442
    3543        // Become an administrator.
    3644        $this->_setRole( 'administrator' );
    3745
    38         $post = self::factory()->post->create_and_get( array(
    39             'post_author' => get_current_user_id(),
    40         ) );
     46        $post = self::factory()->post->create_and_get(
     47            array(
     48                'post_author' => get_current_user_id(),
     49            )
     50        );
    4151
    4252        // Set up a request.
    4353        $_POST['_inline_edit'] = wp_create_nonce( 'inlineeditnonce' );
    44         $_POST['post_ID'] = $post->ID;
    45         $_POST['post_type'] = $post->post_type;
    46         $_POST['content'] = $post->post_content;
    47         $_POST['excerpt'] = $post->post_excerpt;
    48         $_POST['_status'] = $post->post_status;
    49         $_POST['post_status'] = $post->post_status;
    50         $_POST['screen'] = 'post';
    51         $_POST['post_view'] = 'excerpt';
    52         $_POST['tax_input'] = array(
     54        $_POST['post_ID']      = $post->ID;
     55        $_POST['post_type']    = $post->post_type;
     56        $_POST['content']      = $post->post_content;
     57        $_POST['excerpt']      = $post->post_excerpt;
     58        $_POST['_status']      = $post->post_status;
     59        $_POST['post_status']  = $post->post_status;
     60        $_POST['screen']       = 'post';
     61        $_POST['post_view']    = 'excerpt';
     62        $_POST['tax_input']    = array(
    5363            'wptests_tax_1' => array( $t1 ),
    5464            'wptests_tax_2' => array( $t2 ),
Note: See TracChangeset for help on using the changeset viewer.