Changeset 53942 for trunk/tests/phpunit/tests/hooks/addFilter.php
- Timestamp:
- 08/25/2022 03:34:24 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/hooks/addFilter.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/hooks/addFilter.php
r53804 r53942 12 12 public $hook; 13 13 14 /** 15 * Temporary storage for action output. 16 * 17 * Used in the following tests: 18 * - `test_remove_and_add_action()` 19 * - `test_remove_and_add_last_action()` 20 * - `test_remove_and_recurse_and_add_action()` 21 * 22 * @var array 23 */ 24 private $action_output = ''; 25 26 public function tear_down() { 27 $this->action_output = ''; 28 parent::tear_down(); 29 } 30 14 31 public function test_add_filter_with_function() { 15 32 $callback = '__return_null'; … … 203 220 204 221 public function test_remove_and_add_action() { 205 $this->hook = new WP_Hook(); 206 $this->action_output = ''; 222 $this->hook = new WP_Hook(); 207 223 208 224 $this->hook->add_filter( 'remove_and_add_action', '__return_empty_string', 10, 0 ); … … 218 234 219 235 public function test_remove_and_add_last_action() { 220 $this->hook = new WP_Hook(); 221 $this->action_output = ''; 236 $this->hook = new WP_Hook(); 222 237 223 238 $this->hook->add_filter( 'remove_and_add_action', '__return_empty_string', 10, 0 ); … … 233 248 234 249 public function test_remove_and_recurse_and_add_action() { 235 $this->hook = new WP_Hook(); 236 $this->action_output = ''; 250 $this->hook = new WP_Hook(); 237 251 238 252 $this->hook->add_filter( 'remove_and_add_action', '__return_empty_string', 10, 0 );
Note: See TracChangeset
for help on using the changeset viewer.