mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Tests: Remove the polyfill for assertNotFalse().
`assertNotFalse()` is available in PHPUnit since version 4.0. The polyfill was introduced back when WordPress still supported PHP 5.2 and PHPUnit 3.6.x, and is now redundant. Follow-up to [39919], [45058], [47880]. See #38266. git-svn-id: https://develop.svn.wordpress.org/trunk@48953 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -13,23 +13,6 @@ require_once dirname( __DIR__ ) . '/abstract-testcase.php';
|
||||
*/
|
||||
class WP_UnitTestCase extends WP_UnitTestCase_Base {
|
||||
|
||||
/**
|
||||
* Asserts that a condition is not false.
|
||||
*
|
||||
* This method has been backported from a more recent PHPUnit version,
|
||||
* as tests running on PHP 5.2 use PHPUnit 3.6.x.
|
||||
*
|
||||
* @since 4.7.4
|
||||
*
|
||||
* @param bool $condition Condition to check.
|
||||
* @param string $message Optional. Message to display when the assertion fails.
|
||||
*
|
||||
* @throws PHPUnit_Framework_AssertionFailedError
|
||||
*/
|
||||
public static function assertNotFalse( $condition, string $message = '' ): void {
|
||||
self::assertThat( $condition, self::logicalNot( self::isFalse() ), $message );
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that two variables are equal (with delta).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user