Make WordPress Core


Ignore:
Timestamp:
10/07/2022 01:02:07 AM (3 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/comment/getCommentsPagesCount.php

    r53863 r54402  
    175175        $wp_query->max_num_comment_pages = 7;
    176176
    177         $this->assertEquals( 7, get_comment_pages_count() );
    178         $this->assertEquals( 7, get_comment_pages_count( null, null, null ) );
    179         $this->assertEquals( 0, get_comment_pages_count( array(), null, null ) );
     177        $this->assertSame( 7, get_comment_pages_count() );
     178        $this->assertSame( 7, get_comment_pages_count( null, null, null ) );
     179        $this->assertSame( 0, get_comment_pages_count( array(), null, null ) );
    180180
    181181        $wp_query->max_num_comment_pages = $org_max_num_comment_pages;
Note: See TracChangeset for help on using the changeset viewer.