Make WordPress Core


Ignore:
Timestamp:
10/07/2022 01:02:07 AM (4 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/import/parser.php

    r53864 r54402  
    7575                        $this->assertIsArray( $result, $message );
    7676                        $this->assertSame( 'http://localhost/', $result['base_url'], $message );
    77                         $this->assertEquals(
     77                        $this->assertEqualSetsWithIndex(
    7878                                array(
    7979                                        'author_id'           => 2,
     
    8787                                $message
    8888                        );
    89                         $this->assertEquals(
     89                        $this->assertEqualSetsWithIndex(
    9090                                array(
    9191                                        'term_id'              => 3,
     
    9898                                $message
    9999                        );
    100                         $this->assertEquals(
     100                        $this->assertEqualSetsWithIndex(
    101101                                array(
    102102                                        'term_id'         => 22,
     
    108108                                $message
    109109                        );
    110                         $this->assertEquals(
     110                        $this->assertEqualSetsWithIndex(
    111111                                array(
    112112                                        'term_id'          => 40,
     
    124124                        $this->assertCount( 19, $result['posts'][0], $message );
    125125                        $this->assertCount( 18, $result['posts'][1], $message );
    126                         $this->assertEquals(
     126                        $this->assertEqualSetsWithIndex(
    127127                                array(
    128128                                        array(
Note: See TracChangeset for help on using the changeset viewer.