Changeset 42343 for trunk/tests/phpunit/tests/hooks/removeFilter.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/hooks/removeFilter.php
r42200 r42343 9 9 10 10 public function test_remove_filter_with_function() { 11 $callback = '__return_null';12 $hook = new WP_Hook();13 $tag = __FUNCTION__;14 $priority = rand( 1, 100 );11 $callback = '__return_null'; 12 $hook = new WP_Hook(); 13 $tag = __FUNCTION__; 14 $priority = rand( 1, 100 ); 15 15 $accepted_args = rand( 1, 100 ); 16 16 … … 22 22 23 23 public function test_remove_filter_with_object() { 24 $a = new MockAction();25 $callback = array( $a, 'action' );26 $hook = new WP_Hook();27 $tag = __FUNCTION__;28 $priority = rand( 1, 100 );24 $a = new MockAction(); 25 $callback = array( $a, 'action' ); 26 $hook = new WP_Hook(); 27 $tag = __FUNCTION__; 28 $priority = rand( 1, 100 ); 29 29 $accepted_args = rand( 1, 100 ); 30 30 … … 36 36 37 37 public function test_remove_filter_with_static_method() { 38 $callback = array( 'MockAction', 'action' );39 $hook = new WP_Hook();40 $tag = __FUNCTION__;41 $priority = rand( 1, 100 );38 $callback = array( 'MockAction', 'action' ); 39 $hook = new WP_Hook(); 40 $tag = __FUNCTION__; 41 $priority = rand( 1, 100 ); 42 42 $accepted_args = rand( 1, 100 ); 43 43 … … 49 49 50 50 public function test_remove_filters_with_another_at_same_priority() { 51 $callback_one = '__return_null';52 $callback_two = '__return_false';53 $hook = new WP_Hook();54 $tag = __FUNCTION__;55 $priority = rand( 1, 100 );51 $callback_one = '__return_null'; 52 $callback_two = '__return_false'; 53 $hook = new WP_Hook(); 54 $tag = __FUNCTION__; 55 $priority = rand( 1, 100 ); 56 56 $accepted_args = rand( 1, 100 ); 57 57 … … 65 65 66 66 public function test_remove_filter_with_another_at_different_priority() { 67 $callback_one = '__return_null';68 $callback_two = '__return_false';69 $hook = new WP_Hook();70 $tag = __FUNCTION__;71 $priority = rand( 1, 100 );67 $callback_one = '__return_null'; 68 $callback_two = '__return_false'; 69 $hook = new WP_Hook(); 70 $tag = __FUNCTION__; 71 $priority = rand( 1, 100 ); 72 72 $accepted_args = rand( 1, 100 ); 73 73
Note: See TracChangeset
for help on using the changeset viewer.