You appear to be a bot. Output may be restricted
Description
One tag with multiple actions.
Usage
Tests_Actions::test_multiple_actions();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/actions.php
Lines:
1 to 16 of 16
public function test_multiple_actions() { $a1 = new MockAction(); $a2 = new MockAction(); $tag = __FUNCTION__; // Add both actions to the hook. add_action( $tag, array( &$a1, 'action' ) ); add_action( $tag, array( &$a2, 'action' ) ); do_action( $tag ); // Both actions called once each. $this->assertSame( 1, $a1->get_call_count() ); $this->assertSame( 1, $a2->get_call_count() ); }