From 3a9e78c000c3dd1665703bf68f62755f85985a91 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 7 Sep 2020 03:26:24 +0000 Subject: [PATCH] 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 --- tests/phpunit/includes/phpunit7/testcase.php | 17 ----------------- tests/phpunit/includes/testcase.php | 17 ----------------- 2 files changed, 34 deletions(-) diff --git a/tests/phpunit/includes/phpunit7/testcase.php b/tests/phpunit/includes/phpunit7/testcase.php index 44362d835d..9a8ddc12de 100644 --- a/tests/phpunit/includes/phpunit7/testcase.php +++ b/tests/phpunit/includes/phpunit7/testcase.php @@ -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). * diff --git a/tests/phpunit/includes/testcase.php b/tests/phpunit/includes/testcase.php index 068998ae04..6d90d6c0c5 100644 --- a/tests/phpunit/includes/testcase.php +++ b/tests/phpunit/includes/testcase.php @@ -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). *