summaryrefslogtreecommitdiffstatshomepage
path: root/tests/phpunit/includes/testcase-ajax.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/testcase-ajax.php')
-rw-r--r--tests/phpunit/includes/testcase-ajax.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/phpunit/includes/testcase-ajax.php b/tests/phpunit/includes/testcase-ajax.php
index c6db8305c6..0478c10900 100644
--- a/tests/phpunit/includes/testcase-ajax.php
+++ b/tests/phpunit/includes/testcase-ajax.php
@@ -115,8 +115,8 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
'wp-privacy-erase-personal-data',
);
- public static function setUpBeforeClass() {
- parent::setUpBeforeClass();
+ public static function set_up_before_class() {
+ parent::set_up_before_class();
remove_action( 'admin_init', '_maybe_update_core' );
remove_action( 'admin_init', '_maybe_update_plugins' );
@@ -135,8 +135,8 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
*
* Overrides wp_die(), pretends to be Ajax, and suppresses E_WARNINGs.
*/
- public function setUp() {
- parent::setUp();
+ public function set_up() {
+ parent::set_up();
add_filter( 'wp_doing_ajax', '__return_true' );
add_filter( 'wp_die_ajax_handler', array( $this, 'getDieHandler' ), 1, 1 );
@@ -156,7 +156,7 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
*
* Resets $_POST, removes the wp_die() override, restores error reporting.
*/
- public function tearDown() {
+ public function tear_down() {
$_POST = array();
$_GET = array();
unset( $GLOBALS['post'] );
@@ -165,7 +165,7 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
remove_action( 'clear_auth_cookie', array( $this, 'logout' ) );
error_reporting( $this->_error_level );
set_current_screen( 'front' );
- parent::tearDown();
+ parent::tear_down();
}
/**