Build/Test Tools: Move WP_UnitTestCase_Base::assertPostConditions() to a more appropriate place.

See #43218.

git-svn-id: https://develop.svn.wordpress.org/trunk@44719 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-01-30 14:30:42 +00:00
parent 1f809d9ff1
commit 4b8e33fbee
2 changed files with 12 additions and 11 deletions

View File

@ -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.
*

View File

@ -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.
*