Changeset 42343 for trunk/tests/phpunit/tests/hooks/applyFilters.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/hooks/applyFilters.php
r42200 r42343 9 9 10 10 public function test_apply_filters_with_callback() { 11 $a = new MockAction();12 $callback = array( $a, 'filter' );13 $hook = new WP_Hook();14 $tag = __FUNCTION__;15 $priority = rand( 1, 100 );11 $a = new MockAction(); 12 $callback = array( $a, 'filter' ); 13 $hook = new WP_Hook(); 14 $tag = __FUNCTION__; 15 $priority = rand( 1, 100 ); 16 16 $accepted_args = rand( 1, 100 ); 17 $arg = __FUNCTION__ . '_arg';17 $arg = __FUNCTION__ . '_arg'; 18 18 19 19 $hook->add_filter( $tag, $callback, $priority, $accepted_args ); … … 26 26 27 27 public function test_apply_filters_with_multiple_calls() { 28 $a = new MockAction();29 $callback = array( $a, 'filter' );30 $hook = new WP_Hook();31 $tag = __FUNCTION__;32 $priority = rand( 1, 100 );28 $a = new MockAction(); 29 $callback = array( $a, 'filter' ); 30 $hook = new WP_Hook(); 31 $tag = __FUNCTION__; 32 $priority = rand( 1, 100 ); 33 33 $accepted_args = rand( 1, 100 ); 34 $arg = __FUNCTION__ . '_arg';34 $arg = __FUNCTION__ . '_arg'; 35 35 36 36 $hook->add_filter( $tag, $callback, $priority, $accepted_args );
Note: See TracChangeset
for help on using the changeset viewer.