Make WordPress Core


Ignore:
Timestamp:
07/02/2019 04:43:01 AM (6 years ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in tests.

See #47632.

File:
1 edited

Legend:

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

    r44454 r45588  
    4949        global $current_user, $user_ID;
    5050
    51         $current_user = $user_ID = null;
     51        $current_user = null;
     52        $user_ID      = null;
    5253    }
    5354
     
    125126
    126127        // insert a post and make sure the ID is ok
    127         $id = $this->post_ids[] = wp_insert_post( $post );
     128        $id               = wp_insert_post( $post );
     129        $this->post_ids[] = $id;
    128130        #dmp(_get_cron_array());
    129131        $this->assertTrue( is_numeric( $id ) );
     
    159161
    160162        // insert a post and make sure the ID is ok
    161         $id = $this->post_ids[] = wp_insert_post( $post );
     163        $id               = wp_insert_post( $post );
     164        $this->post_ids[] = $id;
    162165
    163166        // fetch the post and make sure has the correct date and status
     
    201204
    202205        // insert a post and make sure the ID is ok
    203         $id = $this->post_ids[] = wp_insert_post( $post );
     206        $id               = wp_insert_post( $post );
     207        $this->post_ids[] = $id;
    204208
    205209        // fetch the post and make sure has the correct date and status
     
    241245
    242246        // insert a post and make sure the ID is ok
    243         $id = $this->post_ids[] = wp_insert_post( $post );
     247        $id               = wp_insert_post( $post );
     248        $this->post_ids[] = $id;
    244249        #dmp(_get_cron_array());
    245250        $this->assertTrue( is_numeric( $id ) );
     
    273278
    274279        // insert a post and make sure the ID is ok
    275         $id = $this->post_ids[] = wp_insert_post( $post );
     280        $id               = wp_insert_post( $post );
     281        $this->post_ids[] = $id;
    276282
    277283        // fetch the post and make sure has the correct date and status
     
    314320
    315321            // insert a post and make sure the ID is ok
    316             $id = $this->post_ids[] = wp_insert_post( $post );
     322            $id               = wp_insert_post( $post );
     323            $this->post_ids[] = $id;
    317324
    318325            // fetch the post and make sure has the correct date and status
     
    354361
    355362        // insert a post and make sure the ID is ok
    356         $id = $this->post_ids[] = wp_insert_post( $post );
     363        $id               = wp_insert_post( $post );
     364        $this->post_ids[] = $id;
    357365        #dmp(_get_cron_array());
    358366        $this->assertTrue( is_numeric( $id ) );
     
    408416
    409417        // insert a post and make sure the ID is ok
    410         $id = $this->post_ids[] = wp_insert_post( $post );
     418        $id               = wp_insert_post( $post );
     419        $this->post_ids[] = $id;
    411420
    412421        // fetch the post and make sure has the correct date and status
     
    512521
    513522        // insert a post and make sure the ID is ok
    514         $id = $this->post_ids[] = wp_insert_post( $post );
     523        $id               = wp_insert_post( $post );
     524        $this->post_ids[] = $id;
    515525
    516526        // check that there's a publish_future_post job scheduled at the right time
     
    541551
    542552        // insert a post and make sure the ID is ok
    543         $id = $this->post_ids[] = wp_insert_post( $post );
     553        $id               = wp_insert_post( $post );
     554        $this->post_ids[] = $id;
    544555
    545556        $plink = get_permalink( $id );
Note: See TracChangeset for help on using the changeset viewer.