Changeset 53942 for trunk/tests/phpunit/tests/comment/query.php
- Timestamp:
- 08/25/2022 03:34:24 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/comment/query.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/query.php
r53863 r53942 10 10 protected $comment_id; 11 11 12 /** 13 * Temporary storage for comment exclusions to allow a filter to access these. 14 * 15 * Used in the following tests: 16 * - `test_comment_clauses_prepend_callback_should_be_respected_when_filling_descendants()` 17 * - `test_comment_clauses_append_callback_should_be_respected_when_filling_descendants()` 18 * 19 * @var array 20 */ 21 private $to_exclude; 22 12 23 public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { 13 24 self::$post_id = $factory->post->create(); 25 } 26 27 public function tear_down() { 28 unset( $this->to_exclude ); 29 parent::tear_down(); 14 30 } 15 31 … … 4302 4318 remove_filter( 'comments_clauses', array( $this, 'prepend_exclusions' ) ); 4303 4319 4304 unset( $this->to_exclude );4305 4306 4320 $this->assertEqualSets( array( $top_level_0, $child1_of_0, $top_level_comments[0], $top_level_comments[2] ), wp_list_pluck( $q->comments, 'comment_ID' ) ); 4307 4321 } … … 4360 4374 ); 4361 4375 remove_filter( 'comments_clauses', array( $this, 'append_exclusions' ) ); 4362 4363 unset( $this->to_exclude );4364 4376 4365 4377 $this->assertEqualSets( array( $top_level_0, $child1_of_0, $top_level_comments[0], $top_level_comments[2] ), wp_list_pluck( $q->comments, 'comment_ID' ) );
Note: See TracChangeset
for help on using the changeset viewer.