Changeset 52010 for trunk/tests/phpunit/tests/query/search.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/search.php
r51568 r52010 8 8 protected $post_type; 9 9 10 function set_up() {10 public function set_up() { 11 11 parent::set_up(); 12 12 … … 17 17 } 18 18 19 function tear_down() {19 public function tear_down() { 20 20 unset( $this->q ); 21 21 … … 23 23 } 24 24 25 function get_search_results( $terms ) {25 private function get_search_results( $terms ) { 26 26 $args = http_build_query( 27 27 array( … … 33 33 } 34 34 35 function test_search_order_title_relevance() {35 public function test_search_order_title_relevance() { 36 36 foreach ( range( 1, 7 ) as $i ) { 37 37 self::factory()->post->create( … … 53 53 } 54 54 55 function test_search_terms_query_var() {55 public function test_search_terms_query_var() { 56 56 $terms = 'This is a search term'; 57 57 $query = new WP_Query( array( 's' => 'This is a search term' ) ); … … 60 60 } 61 61 62 function test_filter_stopwords() {62 public function test_filter_stopwords() { 63 63 $terms = 'This is a search term'; 64 64 add_filter( 'wp_search_stopwords', array( $this, 'filter_wp_search_stopwords' ) ); … … 70 70 } 71 71 72 function filter_wp_search_stopwords() {72 public function filter_wp_search_stopwords() { 73 73 return array(); 74 74 } … … 77 77 * @ticket 38099 78 78 */ 79 function test_disable_search_exclusion_prefix() {79 public function test_disable_search_exclusion_prefix() { 80 80 $title = '-HYPHENATION_TEST'; 81 81 … … 102 102 * @ticket 38099 103 103 */ 104 function test_change_search_exclusion_prefix() {104 public function test_change_search_exclusion_prefix() { 105 105 $title = '#OCTOTHORPE_TEST'; 106 106 … … 125 125 } 126 126 127 function filter_search_exclusion_prefix_octothorpe() {127 public function filter_search_exclusion_prefix_octothorpe() { 128 128 return '#'; 129 129 }
Note: See TracChangeset
for help on using the changeset viewer.