You appear to be a bot. Output may be restricted
Description
Usage
Tests_Actions::test_doing_filter_real();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/actions.php
Lines:
1 to 17 of 17
public function test_doing_filter_real() { $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. add_filter( 'testing', array( $this, 'apply_testing_filter' ) ); $this->assertTrue( has_action( 'testing' ) ); $this->assertSame( 10, has_action( 'testing', array( $this, 'apply_testing_filter' ) ) ); apply_filters( 'testing', '' ); // Make sure it ran. $this->assertTrue( $this->apply_testing_filter ); $this->assertFalse( doing_filter() ); // No longer doing any filters. $this->assertFalse( doing_filter( 'testing' ) ); // No longer doing this filter. }