Changeset 26307 for trunk/tests/phpunit/tests/meta.php
- Timestamp:
- 11/21/2013 07:30:35 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/meta.php
r25255 r26307 172 172 $this->assertEquals( 2, substr_count( $posts->request, 'CAST(' ) ); 173 173 } 174 175 function test_meta_cache_order_asc() { 176 $post_id = $this->factory->post->create(); 177 $colors = array( 'red', 'blue', 'yellow', 'green' ); 178 foreach ( $colors as $color ) 179 add_post_meta( $post_id, 'color', $color ); 180 181 foreach ( range( 1, 10 ) as $i ) { 182 $meta = get_post_meta( $post_id, 'color' ); 183 $this->assertEquals( $meta, $colors ); 184 185 if ( 0 === $i % 2 ) 186 wp_cache_delete( $post_id, 'post_meta' ); 187 } 188 } 174 189 }
Note: See TracChangeset
for help on using the changeset viewer.