[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @group cache 5 * @group core 6 */ 7 class BP_Tests_Core_Cache extends BP_UnitTestCase { 8 /** 9 * @group bp_update_meta_cache 10 */ 11 public function test_bp_update_meta_cache_with_cache_misses() { 12 // Use activity just because 13 $a1 = self::factory()->activity->create(); 14 15 // Confirm that all activitymeta is deleted 16 global $wpdb; 17 18 $bp = buddypress(); 19 20 $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_meta} WHERE activity_id = %d", $a1 ) ); 21 22 bp_update_meta_cache( array( 23 'object_ids' => array( $a1 ), 24 'object_type' => 'activity', 25 'cache_group' => 'activity_meta', 26 'meta_table' => buddypress()->activity->table_name_meta, 27 'object_column' => 'activity_id', 28 ) ); 29 30 $this->assertSame( array(), wp_cache_get( $a1, 'activity_meta' ) ); 31 } 32 } 33
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Nov 21 01:00:57 2024 | Cross-referenced by PHPXref 0.7.1 |