[wp-trac] [WordPress Trac] #55654: Tests: Reduce usage of assertEquals for 6.1
WordPress Trac
noreply at wordpress.org
Fri Oct 7 02:50:51 UTC 2022
#55654: Tests: Reduce usage of assertEquals for 6.1
--------------------------------------+------------------------
Reporter: hellofromTonya | Owner: desrosj
Type: task (blessed) | Status: reviewing
Priority: normal | Milestone: 6.1
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------
Comment (by costdev):
Thanks @desrosj!
Following @SergeyBiryukov's comment above regarding `ceil()`, dropping
[https://core.trac.wordpress.org/ticket/53364#comment:2 a related comment]
I posted during the 5.9 cycle:
> - I've tested one of the proposed solutions, a simple cast to `int`
using `(int)` before the calls to `ceil()`, followed by changing
`assertEquals()` to `assertSame()` for relevant tests. All PHPUnit tests
pass.
> - With coverage incomplete this could, theoretically, be a breaking
change. However, we are yet to come across a real-world example of this,
or even an example scenario where these methods should return a float.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55654#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list