You appear to be a bot. Output may be restricted
Description
Usage
Tests_Filters::test_has_filter_after_remove_all_filters();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/filters.php
Lines:
1 to 23 of 23
public function test_has_filter_after_remove_all_filters() { $a = new MockAction(); $tag = __FUNCTION__; $val = __FUNCTION__ . '_val'; // No priority. add_filter( $tag, array( $a, 'filter' ), 11 ); add_filter( $tag, array( $a, 'filter' ), 12 ); $this->assertTrue( has_filter( $tag ) ); remove_all_filters( $tag ); $this->assertFalse( has_filter( $tag ) ); // Remove priorities one at a time. add_filter( $tag, array( $a, 'filter' ), 11 ); add_filter( $tag, array( $a, 'filter' ), 12 ); $this->assertTrue( has_filter( $tag ) ); remove_all_filters( $tag, 11 ); remove_all_filters( $tag, 12 ); $this->assertFalse( has_filter( $tag ) ); }