You appear to be a bot. Output may be restricted
Description
Usage
Tests_Actions::test_doing_filter();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/actions.php
Lines:
1 to 16 of 16
public function test_doing_filter() { global $wp_current_filter; $wp_current_filter = array(); // Set to an empty array first. $this->assertFalse( doing_filter() ); // No filter is passed in, and no filter is being processed. $this->assertFalse( doing_filter( 'testing' ) ); // Filter is passed in but not being processed. $wp_current_filter[] = 'testing'; $this->assertTrue( doing_filter() ); // No action is passed in, and a filter is being processed. $this->assertTrue( doing_filter( 'testing' ) ); // Filter is passed in and is being processed. $this->assertFalse( doing_filter( 'something_else' ) ); // Filter is passed in but not being processed. $wp_current_filter = array(); }