You appear to be a bot. Output may be restricted
Description
One tag with multiple actions.
Usage
Tests_Actions::test_action_args_1();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/actions.php
Lines:
1 to 15 of 15
public function test_action_args_1() { $a = new MockAction(); $tag = __FUNCTION__; $val = __FUNCTION__ . '_val'; add_action( $tag, array( &$a, 'action' ) ); // Call the action with a single argument. do_action( $tag, $val ); $call_count = $a->get_call_count(); $this->assertSame( 1, $call_count ); $argsvar = $a->get_args(); $this->assertSame( array( $val ), array_pop( $argsvar ) ); }