Changeset 47338 for branches/3.8/tests/phpunit/tests/filters.php
- Timestamp:
- 02/21/2020 01:05:39 PM (5 years ago)
- Location:
- branches/3.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8
- Property svn:mergeinfo changed
-
branches/3.8/tests/phpunit/tests/filters.php
r25377 r47338 250 250 return $tag; 251 251 } 252 253 /**254 * @ticket 21169255 */256 function test_filter_removal_during_filter() {257 $tag = rand_str();258 $a = new MockAction();259 $b = new MockAction();260 261 add_action( $tag, array($a, 'filter_append'), 11, 1 );262 add_action( $tag, array($b, 'filter_append'), 12, 1 );263 add_action( $tag, array($this, '_self_removal'), 10, 1 );264 265 $result = apply_filters($tag, $tag);266 $this->assertEquals( 1, $a->get_call_count(), 'priority 11 filters should run after priority 10 empties itself' );267 $this->assertEquals( 1, $b->get_call_count(), 'priority 12 filters should run after priority 10 empties itself and priority 11 runs' );268 $this->assertEquals( $result, $tag . '_append_append', 'priority 11 and 12 filters should run after priority 10 empties itself' );269 }270 252 }
Note: See TracChangeset
for help on using the changeset viewer.