You appear to be a bot. Output may be restricted
Description
Usage
Tests_Actions::apply_testing_filter();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/actions.php
Lines:
1 to 21 of 21
public function apply_testing_filter() { $this->apply_testing_filter = true; $this->assertTrue( doing_filter() ); $this->assertTrue( doing_filter( 'testing' ) ); $this->assertFalse( doing_filter( 'something_else' ) ); $this->assertFalse( doing_filter( 'testing_nested' ) ); add_filter( 'testing_nested', array( $this, 'apply_testing_nested_filter' ) ); $this->assertTrue( has_action( 'testing_nested' ) ); $this->assertSame( 10, has_action( 'testing_nested', array( $this, 'apply_testing_nested_filter' ) ) ); apply_filters( 'testing_nested', '' ); // Make sure it ran. $this->assertTrue( $this->apply_testing_nested_filter ); $this->assertFalse( doing_filter( 'testing_nested' ) ); $this->assertFalse( doing_filter( 'testing_nested' ) ); }