Changeset 42343 for trunk/tests/phpunit/tests/hooks/hasFilter.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/hooks/hasFilter.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/hooks/hasFilter.php
r42200 r42343 9 9 10 10 public function test_has_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 … … 21 21 22 22 public function test_has_filter_with_object() { 23 $a = new MockAction();24 $callback = array( $a, 'action' );25 $hook = new WP_Hook();26 $tag = __FUNCTION__;27 $priority = rand( 1, 100 );23 $a = new MockAction(); 24 $callback = array( $a, 'action' ); 25 $hook = new WP_Hook(); 26 $tag = __FUNCTION__; 27 $priority = rand( 1, 100 ); 28 28 $accepted_args = rand( 1, 100 ); 29 29 … … 34 34 35 35 public function test_has_filter_with_static_method() { 36 $callback = array( 'MockAction', 'action' );37 $hook = new WP_Hook();38 $tag = __FUNCTION__;39 $priority = rand( 1, 100 );36 $callback = array( 'MockAction', 'action' ); 37 $hook = new WP_Hook(); 38 $tag = __FUNCTION__; 39 $priority = rand( 1, 100 ); 40 40 $accepted_args = rand( 1, 100 ); 41 41 … … 46 46 47 47 public function test_has_filter_without_callback() { 48 $callback = '__return_null';49 $hook = new WP_Hook();50 $tag = __FUNCTION__;51 $priority = rand( 1, 100 );48 $callback = '__return_null'; 49 $hook = new WP_Hook(); 50 $tag = __FUNCTION__; 51 $priority = rand( 1, 100 ); 52 52 $accepted_args = rand( 1, 100 ); 53 53 … … 64 64 public function test_not_has_filter_with_callback() { 65 65 $callback = '__return_null'; 66 $hook = new WP_Hook();67 $tag = __FUNCTION__;66 $hook = new WP_Hook(); 67 $tag = __FUNCTION__; 68 68 69 69 $this->assertFalse( $hook->has_filter( $tag, $callback ) ); … … 71 71 72 72 public function test_has_filter_with_wrong_callback() { 73 $callback = '__return_null';74 $hook = new WP_Hook();75 $tag = __FUNCTION__;76 $priority = rand( 1, 100 );73 $callback = '__return_null'; 74 $hook = new WP_Hook(); 75 $tag = __FUNCTION__; 76 $priority = rand( 1, 100 ); 77 77 $accepted_args = rand( 1, 100 ); 78 78
Note: See TracChangeset
for help on using the changeset viewer.