[wp-trac] [WordPress Trac] #53123: Tests: review of assertTrue or assertFalse with in_array
WordPress Trac
noreply at wordpress.org
Mon Jul 12 10:29:45 UTC 2021
#53123: Tests: review of assertTrue or assertFalse with in_array
------------------------------+-----------------------------
Reporter: hellofromTonya | Owner: SergeyBiryukov
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 5.9
Component: Build/Test Tools | Version:
Severity: minor | Resolution:
Keywords: | Focuses: docs
------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* owner: (none) => SergeyBiryukov
* status: new => accepted
* milestone: Awaiting Review => 5.9
Comment:
I was going to do this as part of a similar work on #53363 (specifically
[51335], [51337], [51367], [51397], and [51403]), but luckily found this
ticket :)
IIRC, `assertContains()` only performs strict comparison for array
elements in PHPUnit 9+. So technically this might seem like a step
backwards from switching to strict comparisons using `assertSame()` in
#38266, #52482, and #53364, as WordPress test suite still uses PHPUnit
7.5.x at the moment.
However, as the plan is to be able to use PHPUnit 9+ via #46149 soon, this
concern would be resolved then.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53123#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list