Changeset 1066 in tests for trunk/tests/post/query.php
- Timestamp:
- 10/02/2012 04:43:07 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/tests/post/query.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/post/query.php
r1065 r1066 50 50 } 51 51 52 /** 53 * @ticket 18158 54 */ 52 55 function test_meta_key_not_exists() { 53 56 $post_id = $this->factory->post->create(); … … 110 113 $this->assertEquals( 0, count( $posts ) ); 111 114 } 115 116 /** 117 * @ticket 20604 118 */ 119 function test_taxonomy_empty_or() { 120 // An empty tax query should return an empty array, not all posts. 121 122 $this->factory->post->create_many( 10 ); 123 124 $query = new WP_Query( array( 125 'fields' => 'ids', 126 'tax_query' => array( 127 'relation' => 'OR', 128 array( 129 'taxonomy' => 'post_tag', 130 'field' => 'id', 131 'terms' => false, 132 'operator' => 'IN' 133 ), 134 array( 135 'taxonomy' => 'category', 136 'field' => 'id', 137 'terms' => false, 138 'operator' => 'IN' 139 ) 140 ) 141 ) ); 142 143 $posts = $query->get_posts(); 144 $this->assertEquals( 0 , count( $posts ) ); 145 } 112 146 }
Note: See TracChangeset
for help on using the changeset viewer.