Changeset 43982 for trunk/tests/phpunit/tests/post/meta.php
- Timestamp:
- 12/12/2018 03:02:00 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43729
- Property svn:mergeinfo changed
-
trunk/tests/phpunit/tests/post/meta.php
r43571 r43982 310 310 ); 311 311 } 312 313 /** 314 * @ticket 44467 315 */ 316 public function test_add_metadata_sets_posts_last_changed() { 317 $post_id = self::factory()->post->create(); 318 319 wp_cache_delete( 'last_changed', 'posts' ); 320 321 $this->assertInternalType( 'integer', add_metadata( 'post', $post_id, 'foo', 'bar' ) ); 322 $this->assertNotFalse( wp_cache_get_last_changed( 'posts' ) ); 323 } 324 325 /** 326 * @ticket 44467 327 */ 328 public function test_update_metadata_sets_posts_last_changed() { 329 $post_id = self::factory()->post->create(); 330 331 wp_cache_delete( 'last_changed', 'posts' ); 332 333 $this->assertInternalType( 'integer', update_metadata( 'post', $post_id, 'foo', 'bar' ) ); 334 $this->assertNotFalse( wp_cache_get_last_changed( 'posts' ) ); 335 } 336 337 /** 338 * @ticket 44467 339 */ 340 public function test_delete_metadata_sets_posts_last_changed() { 341 $post_id = self::factory()->post->create(); 342 343 update_metadata( 'post', $post_id, 'foo', 'bar' ); 344 wp_cache_delete( 'last_changed', 'posts' ); 345 346 $this->assertTrue( delete_metadata( 'post', $post_id, 'foo' ) ); 347 $this->assertNotFalse( wp_cache_get_last_changed( 'posts' ) ); 348 } 312 349 }
Note: See TracChangeset
for help on using the changeset viewer.