Make WordPress Core


Ignore:
Timestamp:
10/07/2022 01:02:07 AM (2 years ago)
Author:
desrosj
Message:

Tests: Replace some occurrences of assertEquals() with assertSame().

This ensures that not only the return values match the expected results, but also that their type is the same.

Props costdev, desrosj.
See #55654.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/countUsers.php

    r52010 r54402  
    5454
    5555        $this->assertSame( 8, $count['total_users'] );
    56         $this->assertEquals(
     56        $this->assertSameSetsWithIndex(
    5757            array(
    5858                'administrator' => 2,
     
    134134
    135135        $this->assertSame( 8, $count['total_users'] );
    136         $this->assertEquals(
     136        $this->assertSameSetsWithIndex(
    137137            array(
    138138                'administrator' => 2,
     
    152152
    153153        $this->assertSame( 2, $count['total_users'] );
    154         $this->assertEquals(
     154        $this->assertSameSetsWithIndex(
    155155            array(
    156156                'administrator' => 1,
     
    167167
    168168        $this->assertSame( 2, $count['total_users'] );
    169         $this->assertEquals(
     169        $this->assertSameSetsWithIndex(
    170170            array(
    171171                'administrator' => 1,
     
    240240
    241241        $this->assertSame( 3, $count['total_users'] );
    242         $this->assertEquals(
     242        $this->assertSameSetsWithIndex(
    243243            array(
    244244                'administrator' => 2,
Note: See TracChangeset for help on using the changeset viewer.