Make WordPress Core


Ignore:
Timestamp:
10/07/2022 01:02:07 AM (19 months 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/option/networkOption.php

    r54080 r54402  
    177177
    178178        // Check they exists.
    179         $this->assertEquals( $funky_meta, get_network_option( $network_id, $option ) );
     179        $this->assertEqualSets( $funky_meta, get_network_option( $network_id, $option ) );
    180180    }
    181181
     
    191191        add_metadata( 'site', $network_id, $option, 'tuesday', true );
    192192        add_metadata( 'site', $network_id, $option, 'wednesday', true );
    193         $this->assertEquals( 'monday', get_network_option( $network_id, $option, true ) );
     193        $this->assertSame( 'monday', get_network_option( $network_id, $option, true ) );
    194194    }
    195195
     
    280280
    281281        add_metadata( 'site', $network_id, $option, $array_w_object, true );
    282         $this->assertEquals( $array_w_object, get_network_option( $network_id, $option ) );
     282        $this->assertEqualSets( $array_w_object, get_network_option( $network_id, $option ) );
    283283    }
    284284
Note: See TracChangeset for help on using the changeset viewer.