Changeset 35242 for trunk/tests/phpunit/tests/query/search.php
- Timestamp:
- 10/17/2015 06:02:16 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/query/search.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/search.php
r35225 r35242 32 32 function test_search_order_title_relevance() { 33 33 foreach ( range( 1, 7 ) as $i ) 34 self:: $factory->post->create( array( 'post_content' => $i . rand_str() . ' about', 'post_type' => $this->post_type ) );35 $post_id = self:: $factory->post->create( array( 'post_title' => 'About', 'post_type' => $this->post_type ) );34 self::factory()->post->create( array( 'post_content' => $i . rand_str() . ' about', 'post_type' => $this->post_type ) ); 35 $post_id = self::factory()->post->create( array( 'post_title' => 'About', 'post_type' => $this->post_type ) ); 36 36 37 37 $posts = $this->get_search_results( 'About' ); … … 64 64 */ 65 65 public function test_s_should_exclude_term_prefixed_with_dash() { 66 $p1 = self:: $factory->post->create( array(66 $p1 = self::factory()->post->create( array( 67 67 'post_status' => 'publish', 68 68 'post_content' => 'This post has foo but also bar', 69 69 ) ); 70 $p2 = self:: $factory->post->create( array(70 $p2 = self::factory()->post->create( array( 71 71 'post_status' => 'publish', 72 72 'post_content' => 'This post has only foo', … … 85 85 */ 86 86 public function test_s_should_exclude_first_term_if_prefixed_with_dash() { 87 $p1 = self:: $factory->post->create( array(87 $p1 = self::factory()->post->create( array( 88 88 'post_status' => 'publish', 89 89 'post_content' => 'This post has foo but also bar', 90 90 ) ); 91 $p2 = self:: $factory->post->create( array(91 $p2 = self::factory()->post->create( array( 92 92 'post_status' => 'publish', 93 93 'post_content' => 'This post has only bar', … … 106 106 */ 107 107 public function test_s_should_not_exclude_for_dashes_in_the_middle_of_words() { 108 $p1 = self:: $factory->post->create( array(108 $p1 = self::factory()->post->create( array( 109 109 'post_status' => 'publish', 110 110 'post_content' => 'This post has foo but also bar', 111 111 ) ); 112 $p2 = self:: $factory->post->create( array(112 $p2 = self::factory()->post->create( array( 113 113 'post_status' => 'publish', 114 114 'post_content' => 'This post has only bar', 115 115 ) ); 116 $p3 = self:: $factory->post->create( array(116 $p3 = self::factory()->post->create( array( 117 117 'post_status' => 'publish', 118 118 'post_content' => 'This post has only foo-bar',
Note: See TracChangeset
for help on using the changeset viewer.