Changeset 57750 for trunk/tests/phpunit/tests/post/query.php
- Timestamp:
- 03/02/2024 01:36:02 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/query.php
r57653 r57750 793 793 $this->assertSame( (bool) wp_using_ext_object_cache(), $filter->get_args()[0][0] ); 794 794 } 795 796 /** 797 * @ticket 56841 798 */ 799 public function test_query_does_not_have_leading_whitespace() { 800 add_filter( 'split_the_query', '__return_false' ); 801 802 $q = new WP_Query( 803 array( 804 'posts_per_page' => 501, 805 ) 806 ); 807 808 remove_filter( 'split_the_query', '__return_false' ); 809 810 $this->assertSame( ltrim( $q->request ), $q->request, 'The query has leading whitespace' ); 811 } 812 813 /** 814 * @ticket 56841 815 */ 816 public function test_query_does_not_have_leading_whitespace_split_the_query() { 817 add_filter( 'split_the_query', '__return_true' ); 818 819 $q = new WP_Query( 820 array( 821 'posts_per_page' => 501, 822 ) 823 ); 824 825 remove_filter( 'split_the_query', '__return_true' ); 826 827 $this->assertSame( ltrim( $q->request ), $q->request, 'The query has leading whitespace' ); 828 } 795 829 }
Note: See TracChangeset
for help on using the changeset viewer.