You appear to be a bot. Output may be restricted
Description
Usage
Tests_Actions::test_action_keyed_array();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/actions.php
Lines:
1 to 24 of 24
public function test_action_keyed_array() { $a = new MockAction(); $tag = __FUNCTION__; add_action( $tag, array( &$a, 'action' ) ); $context = array( 'key1' => 'val1' ); do_action( $tag, $context ); $args = $a->get_args(); $this->assertSame( $args[0][0], $context ); $context2 = array( 'key2' => 'val2', 'key3' => 'val3', ); do_action( $tag, $context2 ); $args = $a->get_args(); $this->assertSame( $args[1][0], $context2 ); }