WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/10/2021 01:23:42 PM (12 months ago)
Author:
SergeyBiryukov
Message:

Tests: Replace most instances of assertEquals() in phpunit/includes/ with assertSame().

Follow-up to [48937], [48939], [48940], [48944].

Props johnbillion, jrf, SergeyBiryukov.
See #38266, #52482.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase-canonical.php

    r49603 r50283  
    309309        // Just test the path and query if present.
    310310        if ( isset( $expected['url'] ) ) {
    311             $this->assertEquals( $expected['url'], $parsed_can_url['path'] . ( ! empty( $parsed_can_url['query'] ) ? '?' . $parsed_can_url['query'] : '' ), $ticket_ref );
     311            $this->assertSame( $expected['url'], $parsed_can_url['path'] . ( ! empty( $parsed_can_url['query'] ) ? '?' . $parsed_can_url['query'] : '' ), $ticket_ref );
    312312        }
    313313
     
    329329            // $_qv should not contain any elements which are set in $query_vars already
    330330            // (i.e. $_GET vars should not be present in the Rewrite).
    331             $this->assertEquals( array(), array_intersect( $query_vars, $_qv ), 'Query vars are duplicated from the Rewrite into $_GET; ' . $ticket_ref );
     331            $this->assertSame( array(), array_intersect( $query_vars, $_qv ), 'Query vars are duplicated from the Rewrite into $_GET; ' . $ticket_ref );
    332332
    333333            $query_vars = array_merge( $query_vars, $_qv );
Note: See TracChangeset for help on using the changeset viewer.