Changeset 43729 for branches/5.0/tests/phpunit/tests/comment/metaCache.php
- Timestamp:
- 10/15/2018 11:45:16 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/tests/phpunit/tests/comment/metaCache.php
r37954 r43729 211 211 $this->assertSame( $num_queries, $wpdb->num_queries ); 212 212 } 213 214 /** 215 * @ticket 44467 216 */ 217 public function test_add_metadata_sets_comments_last_changed() { 218 $comment_id = self::factory()->comment->create(); 219 220 wp_cache_delete( 'last_changed', 'comment' ); 221 222 $this->assertInternalType( 'integer', add_metadata( 'comment', $comment_id, 'foo', 'bar' ) ); 223 $this->assertNotFalse( wp_cache_get_last_changed( 'comment' ) ); 224 } 225 226 /** 227 * @ticket 44467 228 */ 229 public function test_update_metadata_sets_comments_last_changed() { 230 $comment_id = self::factory()->comment->create(); 231 232 wp_cache_delete( 'last_changed', 'comment' ); 233 234 $this->assertInternalType( 'integer', update_metadata( 'comment', $comment_id, 'foo', 'bar' ) ); 235 $this->assertNotFalse( wp_cache_get_last_changed( 'comment' ) ); 236 } 237 238 /** 239 * @ticket 44467 240 */ 241 public function test_delete_metadata_sets_comments_last_changed() { 242 $comment_id = self::factory()->comment->create(); 243 244 update_metadata( 'comment', $comment_id, 'foo', 'bar' ); 245 wp_cache_delete( 'last_changed', 'comment' ); 246 247 $this->assertTrue( delete_metadata( 'comment', $comment_id, 'foo' ) ); 248 $this->assertNotFalse( wp_cache_get_last_changed( 'comment' ) ); 249 } 213 250 }
Note: See TracChangeset
for help on using the changeset viewer.