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/media.php

    r54226 r54402  
    502502
    503503        $images = get_attached_media( 'image', $post_id );
    504         $this->assertEquals( $images, array( $attachment_id => get_post( $attachment_id ) ) );
     504        $this->assertEqualSets( $images, array( $attachment_id => get_post( $attachment_id ) ) );
    505505    }
    506506
Note: See TracChangeset for help on using the changeset viewer.