[wp-trac] [WordPress Trac] #52482: Tests: Reduce usage of assertEquals() for 5.8
WordPress Trac
noreply at wordpress.org
Wed Feb 10 13:24:39 UTC 2021
#52482: Tests: Reduce usage of assertEquals() for 5.8
-----------------------------------+---------------------
Reporter: johnbillion | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 5.8
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: needs-unit-tests php8 | Focuses:
-----------------------------------+---------------------
Comment (by SergeyBiryukov):
In [changeset:"50284" 50284]:
{{{
#!CommitTicketReference repository="" revision="50284"
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 [49904], [49925], [49992], [50012], [50013], [50065],
[50075], [50131], [50150], [50157].
See #38266, #52482.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52482#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list