You appear to be a bot. Output may be restricted
Description
Usage
Tests_Filters::test_filter_ref_array();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/filters.php
Lines:
1 to 16 of 16
public function test_filter_ref_array() { $obj = new stdClass(); $a = new MockAction(); $tag = __FUNCTION__; add_action( $tag, array( $a, 'filter' ) ); apply_filters_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 ); }