Changeset 36404 for trunk/tests/phpunit/tests/query/search.php
- Timestamp:
- 01/26/2016 03:11:12 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/query/search.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/search.php
r36278 r36404 160 160 $this->assertEqualSets( array( $p2 ), $q->posts ); 161 161 } 162 163 /** 164 * @ticket 35594 165 */ 166 public function test_search_should_respect_suppress_filters() { 167 add_filter( 'posts_search', array( $this, 'filter_posts_search' ) ); 168 add_filter( 'posts_search_orderby', array( $this, 'filter_posts_search' ) ); 169 $q = new WP_Query( array( 170 's' => 'foo', 171 'suppress_filters' => true, 172 ) ); 173 remove_filter( 'posts_search', array( $this, 'filter_posts_search' ) ); 174 remove_filter( 'posts_search_orderby', array( $this, 'filter_posts_search' ) ); 175 176 $this->assertNotContains( 'posts_search', $q->request ); 177 } 178 179 public function filter_posts_search( $sql ) { 180 return $sql . ' /* posts_search */'; 181 } 162 182 }
Note: See TracChangeset
for help on using the changeset viewer.