[wp-trac] [WordPress Trac] #52482: Tests: Reduce usage of assertEquals() for 5.8

WordPress Trac noreply at wordpress.org
Wed Feb 10 13:59:59 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):

 Replying to [comment:4 SergeyBiryukov]:
 > If we ignore `assertEqualsWithDelta()` and search specifically for
 `assertEquals()`, there are currently 653 matches in 128 files. This has
 gone up a bit since WordPress 5.6: comment:19:ticket:38266 (572 matches in
 121 files), so apparently some newly introduced tests use `assertEquals()`
 instead of `assertSame()`. Some of those were corrected in [49126] and
 [49547], but more were added in 5.7.

 [50283] and [50284] further reduce the number of `assertEquals()`
 instances to 533 matches in 121 files.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52482#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list