Make WordPress Core


Ignore:
Timestamp:
11/25/2021 07:39:31 PM (5 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Correct the order and naming of expected and actual values in various tests.

This corrects the order of the parameters when used in assertions so if/when they fail the failure message is correct.

See #53363

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/query/commentCount.php

    r51568 r52248  
    8282                $expected = self::$post_ids[4];
    8383
    84                 $this->assertSameSets( $found_post_ids, $expected );
     84                $this->assertSameSets( $expected, $found_post_ids );
    8585        }
    8686
     
    100100                $expected = self::$post_ids[5];
    101101
    102                 $this->assertSameSets( $found_post_ids, $expected );
     102                $this->assertSameSets( $expected, $found_post_ids );
    103103        }
    104104
     
    118118                $expected = array();
    119119
    120                 $this->assertSameSets( $found_post_ids, $expected );
     120                $this->assertSameSets( $expected, $found_post_ids );
    121121        }
    122122        public function test_operator_less_than() {
     
    144144                }
    145145
    146                 $this->assertSameSets( $found_post_ids, $expected );
     146                $this->assertSameSets( $expected, $found_post_ids );
    147147        }
    148148
     
    162162                $expected = array();
    163163
    164                 $this->assertSameSets( $found_post_ids, $expected );
     164                $this->assertSameSets( $expected, $found_post_ids );
    165165        }
    166166
     
    190190                }
    191191
    192                 $this->assertSameSets( $found_post_ids, $expected );
     192                $this->assertSameSets( $expected, $found_post_ids );
    193193
    194194        }
     
    214214                }
    215215
    216                 $this->assertSameSets( $found_post_ids, $expected );
     216                $this->assertSameSets( $expected, $found_post_ids );
    217217        }
    218218
     
    232232                $expected = array();
    233233
    234                 $this->assertSameSets( $found_post_ids, $expected );
     234                $this->assertSameSets( $expected, $found_post_ids );
    235235        }
    236236
     
    256256                }
    257257
    258                 $this->assertSameSets( $found_post_ids, $expected );
     258                $this->assertSameSets( $expected, $found_post_ids );
    259259        }
    260260
     
    274274                $expected = array();
    275275
    276                 $this->assertSameSets( $found_post_ids, $expected );
     276                $this->assertSameSets( $expected, $found_post_ids );
    277277        }
    278278
     
    295295                }
    296296
    297                 $this->assertSameSets( $found_post_ids, $expected );
     297                $this->assertSameSets( $expected, $found_post_ids );
    298298        }
    299299
     
    313313                $expected = array();
    314314
    315                 $this->assertSameSets( $found_post_ids, $expected );
     315                $this->assertSameSets( $expected, $found_post_ids );
    316316        }
    317317
     
    330330                $expected = self::$post_ids[5];
    331331
    332                 $this->assertSameSets( $found_post_ids, $expected );
     332                $this->assertSameSets( $expected, $found_post_ids );
    333333        }
    334334
     
    354354                }
    355355
    356                 $this->assertSameSets( $found_post_ids, $expected );
     356                $this->assertSameSets( $expected, $found_post_ids );
    357357        }
    358358
     
    369369                $expected = self::$post_ids[5];
    370370
    371                 $this->assertSameSets( $found_post_ids, $expected );
     371                $this->assertSameSets( $expected, $found_post_ids );
    372372        }
    373373}
Note: See TracChangeset for help on using the changeset viewer.