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

Props peterwilsoncc.
Fixes #39219.

git-svn-id: https://develop.svn.wordpress.org/trunk@39919 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2017-01-17 03:39:36 +00:00
parent 550818ac31
commit 97a4d6c16d
11 changed files with 37 additions and 25 deletions
+12
View File
@@ -456,6 +456,18 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
}
}
/**
* Asserts that a condition is not false.
*
* @param bool $condition
* @param string $message
*
* @throws PHPUnit_Framework_AssertionFailedError
*/
public static function assertNotFalse( $condition, $message = '' ) {
self::assertThat( $condition, self::logicalNot( self::isFalse() ), $message );
}
/**
* Modify WordPress's query internals as if a given URL has been requested.
*