Make WordPress Core


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

    r38288 r42343  
    1010    public function test_parse_query_s_array() {
    1111        $q = new WP_Query();
    12         $q->parse_query( array(
    13             's' => array( 'foo' ),
    14         ) );
     12        $q->parse_query(
     13            array(
     14                's' => array( 'foo' ),
     15            )
     16        );
    1517
    1618        $this->assertSame( '', $q->query_vars['s'] );
     
    1921    public function test_parse_query_s_string() {
    2022        $q = new WP_Query();
    21         $q->parse_query( array(
    22             's' => 'foo',
    23         ) );
     23        $q->parse_query(
     24            array(
     25                's' => 'foo',
     26            )
     27        );
    2428
    2529        $this->assertSame( 'foo', $q->query_vars['s'] );
     
    2832    public function test_parse_query_s_float() {
    2933        $q = new WP_Query();
    30         $q->parse_query( array(
    31             's' => 3.5,
    32         ) );
     34        $q->parse_query(
     35            array(
     36                's' => 3.5,
     37            )
     38        );
    3339
    3440        $this->assertSame( 3.5, $q->query_vars['s'] );
     
    3743    public function test_parse_query_s_int() {
    3844        $q = new WP_Query();
    39         $q->parse_query( array(
    40             's' => 3,
    41         ) );
     45        $q->parse_query(
     46            array(
     47                's' => 3,
     48            )
     49        );
    4250
    4351        $this->assertSame( 3, $q->query_vars['s'] );
     
    4654    public function test_parse_query_s_bool() {
    4755        $q = new WP_Query();
    48         $q->parse_query( array(
    49             's' => true,
    50         ) );
     56        $q->parse_query(
     57            array(
     58                's' => true,
     59            )
     60        );
    5161
    5262        $this->assertSame( true, $q->query_vars['s'] );
     
    5868    public function test_parse_query_p_negative_int() {
    5969        $q = new WP_Query();
    60         $q->parse_query( array(
    61             'p' => -3,
    62         ) );
     70        $q->parse_query(
     71            array(
     72                'p' => -3,
     73            )
     74        );
    6375
    6476        $this->assertSame( '404', $q->query_vars['error'] );
     
    7082    public function test_parse_query_p_array() {
    7183        $q = new WP_Query();
    72         $q->parse_query( array(
    73             'p' => array(),
    74         ) );
     84        $q->parse_query(
     85            array(
     86                'p' => array(),
     87            )
     88        );
    7589
    7690        $this->assertSame( '404', $q->query_vars['error'] );
     
    8296    public function test_parse_query_p_object() {
    8397        $q = new WP_Query();
    84         $q->parse_query( array(
    85             'p' => new stdClass(),
    86         ) );
     98        $q->parse_query(
     99            array(
     100                'p' => new stdClass(),
     101            )
     102        );
    87103
    88104        $this->assertSame( '404', $q->query_vars['error'] );
Note: See TracChangeset for help on using the changeset viewer.