[wp-trac] [WordPress Trac] #64324: Tests: Reduce usage of assertEquals for 7.0
WordPress Trac
noreply at wordpress.org
Wed Dec 31 19:00:40 UTC 2025
#64324: Tests: Reduce usage of assertEquals for 7.0
--------------------------------------+-------------------------------
Reporter: SergeyBiryukov | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 7.0
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: coding-standards
--------------------------------------+-------------------------------
Comment (by SergeyBiryukov):
In [changeset:"61420" 61420]:
{{{
#!CommitTicketReference repository="" revision="61420"
Tests: Use `assertSame()` in `populate_network()` 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 [60954].
See #64324.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64324#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list