[wp-trac] [WordPress Trac] #38266: Tests: Use assertSame() when the type of the value in the assertion is important

WordPress Trac noreply at wordpress.org
Thu Jul 11 08:57:40 UTC 2019


#38266: Tests: Use assertSame() when the type of the value in the assertion is
important
------------------------------+-----------------------------
 Reporter:  johnbillion       |       Owner:  (none)
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Future Release
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  needs-unit-tests  |     Focuses:
------------------------------+-----------------------------

Comment (by johnbillion):

 I wrote a package to detect usage of `assertEquals()` on falsey values:
 https://github.com/johnbillion/falsey-assertequals-detector. If someone
 wants to pick this up, that package could be used to start addressing
 these cases in core.

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


More information about the wp-trac mailing list