WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/02/2019 04:43:01 AM (3 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/includes/testcase-canonical.php

    r44701 r45588  
    6262            )
    6363        );
    64         self::$post_ids[] = $post_id = $factory->post->create(
     64        $post_id          = $factory->post->create(
    6565            array(
    6666                'post_title' => 'post-format-test-gallery',
     
    6868            )
    6969        );
    70         self::$post_ids[] = $factory->post->create(
     70        self::$post_ids[] = $post_id;
     71        $factory->post->create(
    7172            array(
    7273                'import_id'   => 611,
     
    7677            )
    7778        );
     79        self::$post_ids[] = $post_id;
    7880
    7981        self::$post_ids[] = $factory->post->create(
     
    8587        );
    8688
    87         self::$post_ids[]  = $post_id = $factory->post->create(
     89        $post_id          = $factory->post->create(
    8890            array(
    8991                'import_id'  => 149,
     
    9294            )
    9395        );
     96        self::$post_ids[]  = $post_id;
    9497        self::$comment_ids = $factory->comment->create_post_comments( $post_id, 15 );
    9598
     
    112115            )
    113116        );
    114         self::$post_ids[] = $post_id = $factory->post->create(
     117        $post_id          = $factory->post->create(
    115118            array(
    116119                'post_type'  => 'page',
     
    118121            )
    119122        );
     123        self::$post_ids[] = $post_id;
    120124        self::$post_ids[] = $factory->post->create(
    121125            array(
     
    127131        );
    128132
    129         self::$post_ids[] = $parent_id = $factory->post->create(
     133        $parent_id        = $factory->post->create(
    130134            array(
    131135                'post_name' => 'parent',
     
    133137            )
    134138        );
    135         self::$post_ids[] = $child_id_1 = $factory->post->create(
     139        self::$post_ids[] = $parent_id;
     140        $child_id_1       = $factory->post->create(
    136141            array(
    137142                'post_name'   => 'child1',
     
    140145            )
    141146        );
    142         self::$post_ids[] = $child_id_2 = $factory->post->create(
     147        self::$post_ids[] = $child_id_1;
     148        $child_id_2       = $factory->post->create(
    143149            array(
    144150                'post_name'   => 'child2',
     
    147153            )
    148154        );
    149         self::$post_ids[] = $grandchild_id_1 = $factory->post->create(
     155        self::$post_ids[] = $child_id_2;
     156        $grandchild_id_1  = $factory->post->create(
    150157            array(
    151158                'post_name'   => 'grandchild',
     
    154161            )
    155162        );
    156         self::$post_ids[] = $grandchild_id_2 = $factory->post->create(
     163        self::$post_ids[] = $grandchild_id_1;
     164        $grandchild_id_2  = $factory->post->create(
    157165            array(
    158166                'post_name'   => 'grandchild',
     
    161169            )
    162170        );
     171        self::$post_ids[] = $grandchild_id_2;
    163172
    164173        $cat1                             = $factory->term->create(
Note: See TracChangeset for help on using the changeset viewer.