You appear to be a bot. Output may be restricted
Description
Usage
Tests_Actions::test_action_recursion();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/actions.php
Lines:
1 to 14 of 14
public function test_action_recursion() { $tag = __FUNCTION__; $a = new MockAction(); $b = new MockAction(); add_action( $tag, array( $a, 'action' ), 11, 1 ); add_action( $tag, array( $b, 'action' ), 13, 1 ); add_action( $tag, array( $this, 'action_that_causes_recursion' ), 12, 1 ); do_action( $tag, $tag ); $this->assertSame( 2, $a->get_call_count(), 'recursive actions should call all callbacks with earlier priority' ); $this->assertSame( 2, $b->get_call_count(), 'recursive actions should call callbacks with later priority' ); }