Changeset 11737 for trunk/tests/phpunit/testcases/activity/cache.php
- Timestamp:
- 11/03/2017 07:44:10 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/activity/cache.php
r11076 r11737 10 10 */ 11 11 public function test_bp_activity_update_meta_cache() { 12 $a1 = $this->factory->activity->create();13 $a2 = $this->factory->activity->create();12 $a1 = self::factory()->activity->create(); 13 $a2 = self::factory()->activity->create(); 14 14 15 15 // Set up some data … … 59 59 */ 60 60 public function test_bp_activity_clear_cache_for_activity() { 61 $u = $this->factory->user->create();62 63 $a = $this->factory->activity->create( array(61 $u = self::factory()->user->create(); 62 63 $a = self::factory()->activity->create( array( 64 64 'component' => buddypress()->activity->id, 65 65 'type' => 'activity_update', … … 92 92 global $wpdb; 93 93 94 $u = $this->factory->user->create();95 $a = $this->factory->activity->create( array(94 $u = self::factory()->user->create(); 95 $a = self::factory()->activity->create( array( 96 96 'component' => buddypress()->activity->id, 97 97 'type' => 'activity_update', … … 123 123 global $wpdb; 124 124 125 $u = $this->factory->user->create();126 $a = $this->factory->activity->create( array(125 $u = self::factory()->user->create(); 126 $a = self::factory()->activity->create( array( 127 127 'component' => buddypress()->activity->id, 128 128 'type' => 'activity_update', … … 162 162 global $wpdb; 163 163 164 $u = $this->factory->user->create();165 $a1 = $this->factory->activity->create( array(164 $u = self::factory()->user->create(); 165 $a1 = self::factory()->activity->create( array( 166 166 'component' => buddypress()->activity->id, 167 167 'type' => 'activity_update', … … 179 179 180 180 // Bust the cache. 181 $a2 = $this->factory->activity->create( array(181 $a2 = self::factory()->activity->create( array( 182 182 'component' => buddypress()->activity->id, 183 183 'type' => 'activity_update', … … 204 204 global $wpdb; 205 205 206 $u = $this->factory->user->create();207 $a = $this->factory->activity->create( array(206 $u = self::factory()->user->create(); 207 $a = self::factory()->activity->create( array( 208 208 'component' => buddypress()->activity->id, 209 209 'type' => 'activity_update', … … 221 221 222 222 // Bust the cache. 223 $this->factory->activity->create( array(223 self::factory()->activity->create( array( 224 224 'id' => $a, 225 225 'component' => buddypress()->activity->id, … … 244 244 global $wpdb; 245 245 246 $u = $this->factory->user->create();247 $a = $this->factory->activity->create( array(246 $u = self::factory()->user->create(); 247 $a = self::factory()->activity->create( array( 248 248 'component' => buddypress()->activity->id, 249 249 'type' => 'activity_update', … … 281 281 global $wpdb; 282 282 283 $activities = $this->factory->activity->create_many( 2 );283 $activities = self::factory()->activity->create_many( 2 ); 284 284 bp_activity_add_meta( $activities[0], 'foo', 'bar' ); 285 285 … … 309 309 global $wpdb; 310 310 311 $activities = $this->factory->activity->create_many( 2 );311 $activities = self::factory()->activity->create_many( 2 ); 312 312 bp_activity_add_meta( $activities[0], 'foo', 'bar' ); 313 313 bp_activity_add_meta( $activities[1], 'foo', 'baz' ); … … 338 338 global $wpdb; 339 339 340 $activities = $this->factory->activity->create_many( 2 );340 $activities = self::factory()->activity->create_many( 2 ); 341 341 bp_activity_add_meta( $activities[0], 'foo', 'bar' ); 342 342 bp_activity_add_meta( $activities[1], 'foo', 'bar' );
Note: See TracChangeset
for help on using the changeset viewer.