Changeset 8100 for trunk/tests/testcases/notifications/functions.php
- Timestamp:
- 03/09/2014 07:59:01 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/tests/testcases/notifications/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/testcases/notifications/functions.php
r7813 r8100 53 53 $this->assertFalse( wp_cache_get( 'all_for_user_' . $u, 'bp_notifications' ) ); 54 54 } 55 56 /** 57 * @group bp_notifications_add_notification 58 */ 59 public function test_bp_notifications_add_notification_no_dupes() { 60 $args = array( 61 'user_id' => 5, 62 'item_id' => 10, 63 'secondary_item_id' => 25, 64 'component_name' => 'messages', 65 'component_action' => 'new_message', 66 ); 67 68 $n = $this->factory->notification->create( $args ); 69 70 $this->assertFalse( bp_notifications_add_notification( $args ) ); 71 } 72 73 /** 74 * @group bp_notifications_add_notification 75 */ 76 public function test_bp_notifications_add_notification_allow_duplicate() { 77 $args = array( 78 'user_id' => 5, 79 'item_id' => 10, 80 'secondary_item_id' => 25, 81 'component_name' => 'messages', 82 'component_action' => 'new_message', 83 ); 84 85 $n = $this->factory->notification->create( $args ); 86 87 $args['allow_duplicate'] = true; 88 89 $this->assertNotEmpty( bp_notifications_add_notification( $args ) ); 90 } 55 91 }
Note: See TracChangeset
for help on using the changeset viewer.