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/term/taxQuery.php

    r51568 r54402  
    6060        );
    6161
    62         $this->assertEquals( $expected, $tq->queries[0] );
     62        $this->assertSameSetsWithIndex( $expected, $tq->queries[0] );
    6363    }
    6464
     
    8383        );
    8484
    85         $this->assertEquals( $expected, $tq->queries[0] );
     85        $this->assertSameSetsWithIndex( $expected, $tq->queries[0] );
    8686    }
    8787
     
    263263        $tq->transform_query( $tq->queries[0], 'term_taxonomy_id' );
    264264
    265         $this->assertEquals( $tt_ids, $tq->queries[0]['terms'] );
     265        $this->assertEqualSets( $tt_ids, $tq->queries[0]['terms'] );
    266266        $this->assertSame( 'term_taxonomy_id', $tq->queries[0]['field'] );
    267267    }
Note: See TracChangeset for help on using the changeset viewer.