You appear to be a bot. Output may be restricted
Description
Sets up the test fixture.
Overrides wp_die(), pretends to be Ajax, and suppresses E_WARNINGs.
Usage
WP_Ajax_UnitTestCase::set_up();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/includes/testcase-ajax.php
Lines:
1 to 16 of 16
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 ); set_current_screen( 'ajax' ); // Clear logout cookies. add_action( 'clear_auth_cookie', array( $this, 'logout' ) ); // Suppress warnings from "Cannot modify header information - headers already sent by". $this->_error_level = error_reporting(); error_reporting( $this->_error_level & ~E_WARNING ); }