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

WordPress Trac noreply at wordpress.org
Sat Dec 10 04:05:50 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:
------------------------------+----------------------------
Changes (by peterwilsoncc):

 * keywords:  needs-patch => has-patch
 * owner:   => peterwilsoncc
 * status:  new => assigned


Comment:

 In [attachment:39219.diff].

 I've tested locally that it passes with all falsy values except `false`.
 I'm not sure where I should put these.

 {{{#!php
 $this->assertNotFalse( 0 );
 $this->assertNotFalse( null );
 $this->assertNotFalse( '' );
 $this->assertNotFalse( array() );
 $this->assertNotFalse( 0.0 );
 $this->assertNotFalse( '0' );
 }}}

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


More information about the wp-trac mailing list