Changeset 53942 for trunk/tests/phpunit/tests/post/query.php
- Timestamp:
- 08/25/2022 03:34:24 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/query.php
r52389 r53942 6 6 */ 7 7 class Tests_Post_Query extends WP_UnitTestCase { 8 9 /** 10 * Temporary storage for a post ID for tests using filter callbacks. 11 * 12 * Used in the `test_posts_pre_query_filter_should_respect_set_found_posts()` method. 13 * 14 * @var int 15 */ 16 private $post_id; 17 18 /** 19 * Clean up after each test. 20 */ 21 public function tear_down() { 22 unset( $this->post_id ); 23 24 parent::tear_down(); 25 } 26 8 27 /** 9 28 * @group taxonomy … … 730 749 */ 731 750 public function test_found_posts_should_be_integer_not_string() { 732 $ this->post_id = self::factory()->post->create();751 $post_id = self::factory()->post->create(); 733 752 734 753 $q = new WP_Query( … … 745 764 */ 746 765 public function test_found_posts_should_be_integer_even_if_found_posts_filter_returns_string_value() { 747 $ this->post_id = self::factory()->post->create();766 $post_id = self::factory()->post->create(); 748 767 749 768 add_filter( 'found_posts', '__return_empty_string' );
Note: See TracChangeset
for help on using the changeset viewer.