- Timestamp:
- 03/05/2018 12:57:24 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/notifications/functions.php
r11851 r11888 404 404 $this->n_args = compact( 'action', 'item_id', 'secondary_item_id', 'total_items', 'id', 'format' ); 405 405 } 406 407 /** 408 * @group cache 409 * @ticket BP7130 410 */ 411 public function test_get_grouped_notifications_for_user_cache_invalidation() { 412 $u = self::factory()->user->create(); 413 414 $n1 = self::factory()->notification->create( array( 415 'component_name' => 'activity', 416 'component_action' => 'new_at_mention', 417 'item_id' => 99, 418 'user_id' => $u, 419 ) ); 420 421 // Prime cache. 422 $found = bp_notifications_get_grouped_notifications_for_user( $u ); 423 $this->assertEquals( 1, $found[0]->total_count ); 424 425 $n2 = self::factory()->notification->create( array( 426 'component_name' => 'activity', 427 'component_action' => 'new_at_mention', 428 'item_id' => 100, 429 'user_id' => $u, 430 ) ); 431 432 $found = bp_notifications_get_grouped_notifications_for_user( $u ); 433 $this->assertEquals( 2, $found[0]->total_count ); 434 } 406 435 }
Note: See TracChangeset
for help on using the changeset viewer.