You appear to be a bot. Output may be restricted
Description
Usage
Tests_Filters::test_multiple_filters();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/filters.php
Lines:
1 to 17 of 17
public function test_multiple_filters() { $a1 = new MockAction(); $a2 = new MockAction(); $tag = __FUNCTION__; $val = __FUNCTION__ . '_val'; // Add both filters to the hook. add_filter( $tag, array( $a1, 'filter' ) ); add_filter( $tag, array( $a2, 'filter' ) ); $this->assertSame( $val, apply_filters( $tag, $val ) ); // Both filters called once each. $this->assertSame( 1, $a1->get_call_count() ); $this->assertSame( 1, $a2->get_call_count() ); }