diff --git a/tests/phpunit/includes/abstract-testcase.php b/tests/phpunit/includes/abstract-testcase.php index e84f80d1c3..c90a1614e8 100644 --- a/tests/phpunit/includes/abstract-testcase.php +++ b/tests/phpunit/includes/abstract-testcase.php @@ -136,17 +136,6 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase { add_filter( 'wp_die_handler', array( $this, 'get_wp_die_handler' ) ); } - /** - * Detect post-test failure conditions. - * - * We use this method to detect expectedDeprecated and expectedIncorrectUsage annotations. - * - * @since 4.2.0 - */ - protected function assertPostConditions() { - $this->expectedDeprecated(); - } - /** * After a test method runs, reset any state in WordPress the test method might have changed. */ @@ -448,6 +437,17 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase { } } + /** + * Detect post-test failure conditions. + * + * We use this method to detect expectedDeprecated and expectedIncorrectUsage annotations. + * + * @since 4.2.0 + */ + protected function assertPostConditions() { + $this->expectedDeprecated(); + } + /** * Declare an expected `_deprecated_function()` or `_deprecated_argument()` call from within a test. * diff --git a/tests/phpunit/includes/phpunit7/testcase.php b/tests/phpunit/includes/phpunit7/testcase.php index 325c553eed..9edc885e6a 100644 --- a/tests/phpunit/includes/phpunit7/testcase.php +++ b/tests/phpunit/includes/phpunit7/testcase.php @@ -12,6 +12,7 @@ require_once dirname( dirname( __FILE__ ) ) . '/abstract-testcase.php'; * All WordPress unit tests should inherit from this class. */ class WP_UnitTestCase extends WP_UnitTestCase_Base { + /** * Asserts that a condition is not false. *