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:
parent
5bad67bccf
commit
3a9e78c000
@ -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).
|
||||
*
|
||||
|
@ -13,23 +13,6 @@ require_once __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, $message = '' ) {
|
||||
self::assertThat( $condition, self::logicalNot( self::isFalse() ), $message );
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that two variables are equal (with delta).
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user