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/tests/admin/includesPost.php

    r45424 r45588  
    1414
    1515    public static function wpSetUpBeforeClass( $factory ) {
    16         self::$user_ids = self::$author_ids = $factory->user->create_many( 2, array( 'role' => 'author' ) );
    17 
    18         self::$user_ids[] = self::$contributor_id = $factory->user->create( array( 'role' => 'contributor' ) );
    19         self::$user_ids[] = self::$editor_id = $factory->user->create( array( 'role' => 'editor' ) );
    20         self::$user_ids[] = self::$admin_id = $factory->user->create( array( 'role' => 'administrator' ) );
     16        self::$user_ids   = $factory->user->create_many( 2, array( 'role' => 'author' ) );
     17        self::$author_ids = self::$user_ids;
     18
     19        self::$contributor_id = $factory->user->create( array( 'role' => 'contributor' ) );
     20        self::$user_ids[]     = self::$contributor_id;
     21        self::$editor_id      = $factory->user->create( array( 'role' => 'editor' ) );
     22        self::$user_ids[]     = self::$editor_id;
     23        self::$admin_id       = $factory->user->create( array( 'role' => 'administrator' ) );
     24        self::$user_ids[]     = self::$admin_id;
    2125
    2226        self::$post_id = $factory->post->create();
Note: See TracChangeset for help on using the changeset viewer.