Make WordPress Core


Ignore:
Timestamp:
04/06/2017 06:19:02 PM (7 years ago)
Author:
swissspidy
Message:

Build/Test Tools: Add assertNotFalse() method to WP_UnitTestCase and use it where appropriate.

Props peterwilsoncc.
Fixes #39219.

Merges [39919] to the 4.7 branch.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/tests/phpunit/includes/testcase.php

    r40250 r40388  
    459459        ksort( $actual );
    460460        $this->assertEquals( $expected, $actual );
     461    }
     462
     463    /**
     464     * Asserts that a condition is not false.
     465     *
     466     * @param bool   $condition
     467     * @param string $message
     468     *
     469     * @throws PHPUnit_Framework_AssertionFailedError
     470     */
     471    public static function assertNotFalse( $condition, $message = '' ) {
     472        self::assertThat( $condition, self::logicalNot( self::isFalse() ), $message );
    461473    }
    462474
Note: See TracChangeset for help on using the changeset viewer.