You appear to be a bot. Output may be restricted
Description
Tests PHP 4 notation for calling actions while passing in an object by reference.
Usage
Tests_Actions::test_action_args_with_php4_syntax();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/actions.php
Lines:
1 to 14 of 14
public function test_action_args_with_php4_syntax() { $a = new MockAction(); $tag = __FUNCTION__; $val = new stdClass(); add_action( $tag, array( &$a, 'action' ) ); // Call the action with PHP 4 notation for passing object by reference. do_action( $tag, array( &$val ) ); $call_count = $a->get_call_count(); $argsvar = $a->get_args(); $this->assertSame( array( $val ), array_pop( $argsvar ) ); }