[wp-trac] [WordPress Trac] #39219: Add `assertNotFalse` method to `WP_UnitTestCase`.

WordPress Trac noreply at wordpress.org
Sat Dec 10 04:40:19 UTC 2016


#39219: Add `assertNotFalse` method to `WP_UnitTestCase`.
------------------------------+----------------------------
 Reporter:  peterwilsoncc     |       Owner:  peterwilsoncc
     Type:  enhancement       |      Status:  assigned
 Priority:  normal            |   Milestone:  4.8
Component:  Build/Test Tools  |     Version:  trunk
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+----------------------------

Comment (by peterwilsoncc):

 Replying to [comment:2 dd32]:
 > Is it possible to find the occurrences in the current unit tests where
 this was to be used, but avoided?

 Uploaded in [attachment:39219-unit-tests-to-replace.diff], it replaces
 `assertNotSame( false, $actual )` with `assertNotFalse( $actual )`. There
 are a few `assertNotEquals()` calls that look like they could be replaced
 but I'd prefer to be conservative.

 I've kept the tests seperate, do you think they can be committed as part
 of this ticket or should it be a follow up?

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


More information about the wp-trac mailing list