Changeset 25356
- Timestamp:
- 09/11/2013 06:45:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/results.php
r25280 r25356 111 111 function test_query_tag_id() { 112 112 $tag = tag_exists('tag-a'); 113 $posts = $this->q->query( "tag_id={$tag[term_id]}");113 $posts = $this->q->query( "tag_id=" . $tag['term_id'] ); 114 114 115 115 // there are 4 posts with Tag A … … 138 138 $tag_a = tag_exists('tag-a'); 139 139 $tag_b = tag_exists('tag-b'); 140 $posts = $this->q->query( "tag__in[]={$tag_a[term_id]}&tag__in[]={$tag_b[term_id]}");140 $posts = $this->q->query( "tag__in[]=". $tag_a['term_id'] . "&tag__in[]=" . $tag_b['term_id'] ); 141 141 142 142 // there are 6 posts with either Tag A or Tag B … … 152 152 function test_query_tag__not_in() { 153 153 $tag_a = tag_exists('tag-a'); 154 $posts = $this->q->query( "tag__not_in[]={$tag_a[term_id]}");154 $posts = $this->q->query( "tag__not_in[]=" . $tag_a['term_id'] ); 155 155 156 156 // the most recent 10 posts with Tag A excluded … … 175 175 $tag_a = tag_exists('tag-a'); 176 176 $tag_b = tag_exists('tag-b'); 177 $posts = $this->q->query( "tag__in[]={$tag_a[term_id]}&tag__not_in[]={$tag_b[term_id]}");177 $posts = $this->q->query( "tag__in[]=" . $tag_a['term_id'] . "&tag__not_in[]=" . $tag_b['term_id'] ); 178 178 179 179 // there are 4 posts with Tag A, only 2 when we exclude Tag B
Note: See TracChangeset
for help on using the changeset viewer.