You appear to be a bot. Output may be restricted
Description
Usage
Tests_Actions::test_simple_action();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/actions.php
Lines:
1 to 17 of 17
public function test_simple_action() { $a = new MockAction(); $tag = __FUNCTION__; add_action( $tag, array( &$a, 'action' ) ); do_action( $tag ); // Only one event occurred for the hook, with empty args. $this->assertSame( 1, $a->get_call_count() ); // Only our hook was called. $this->assertSame( array( $tag ), $a->get_tags() ); $argsvar = $a->get_args(); $args = array_pop( $argsvar ); $this->assertSame( array( '' ), $args ); }