Changeset 43729 for branches/5.0/tests/phpunit/tests/post/meta.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/post/meta.php
r43510 r43729 306 306 ); 307 307 } 308 309 /** 310 * @ticket 44467 311 */ 312 public function test_add_metadata_sets_posts_last_changed() { 313 $post_id = self::factory()->post->create(); 314 315 wp_cache_delete( 'last_changed', 'posts' ); 316 317 $this->assertInternalType( 'integer', add_metadata( 'post', $post_id, 'foo', 'bar' ) ); 318 $this->assertNotFalse( wp_cache_get_last_changed( 'posts' ) ); 319 } 320 321 /** 322 * @ticket 44467 323 */ 324 public function test_update_metadata_sets_posts_last_changed() { 325 $post_id = self::factory()->post->create(); 326 327 wp_cache_delete( 'last_changed', 'posts' ); 328 329 $this->assertInternalType( 'integer', update_metadata( 'post', $post_id, 'foo', 'bar' ) ); 330 $this->assertNotFalse( wp_cache_get_last_changed( 'posts' ) ); 331 } 332 333 /** 334 * @ticket 44467 335 */ 336 public function test_delete_metadata_sets_posts_last_changed() { 337 $post_id = self::factory()->post->create(); 338 339 update_metadata( 'post', $post_id, 'foo', 'bar' ); 340 wp_cache_delete( 'last_changed', 'posts' ); 341 342 $this->assertTrue( delete_metadata( 'post', $post_id, 'foo' ) ); 343 $this->assertNotFalse( wp_cache_get_last_changed( 'posts' ) ); 344 } 308 345 }
Note: See TracChangeset
for help on using the changeset viewer.