Make WordPress Core


Ignore:
Timestamp:
01/06/2024 12:59:49 PM (5 months ago)
Author:
SergeyBiryukov
Message:

Tests: Use assertSame() in some newly introduced tests.

This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using assertSame() should generally be preferred to assertEquals() where appropriate, to make the tests more reliable.

Follow-up to [55859], [56380], [56802], [57115], [57129], [57185].

See #59655.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/wpAjaxImageEditor.php

    r56421 r57244  
    5353
    5454        $this->assertObjectHasProperty( 'error', $ret );
    55         $this->assertEquals( 'Images cannot be scaled to a size larger than the original.', $ret->error );
     55        $this->assertSame( 'Images cannot be scaled to a size larger than the original.', $ret->error );
    5656    }
    5757
Note: See TracChangeset for help on using the changeset viewer.