You appear to be a bot. Output may be restricted
Description
Usage
Tests_Actions::test_action_ref_array();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/actions.php
Lines:
1 to 16 of 16
public function test_action_ref_array() { $obj = new stdClass(); $a = new MockAction(); $tag = __FUNCTION__; add_action( $tag, array( &$a, 'action' ) ); do_action_ref_array( $tag, array( &$obj ) ); $args = $a->get_args(); $this->assertSame( $args[0][0], $obj ); // Just in case we don't trust assertSame(). $obj->foo = true; $this->assertNotEmpty( $args[0][0]->foo ); }