- Timestamp:
- 09/07/2013 01:02:33 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/testcases/friends/class-bp-friends-friendship.php
r7039 r7374 78 78 } 79 79 80 /** 81 * @group check_is_friend 82 */ 83 public function test_check_is_friend_not_friends() { 84 $u1 = $this->create_user(); 85 $u2 = $this->create_user(); 86 $this->assertEquals( 'not_friends', BP_Friends_Friendship::check_is_friend( $u1, $u2 ) ); 87 } 80 88 89 /** 90 * @group check_is_friend 91 */ 92 public function test_check_is_friend_pending() { 93 $u1 = $this->create_user(); 94 $u2 = $this->create_user(); 95 friends_add_friend( $u1, $u2, false ); 96 $this->assertEquals( 'pending', BP_Friends_Friendship::check_is_friend( $u1, $u2 ) ); 97 } 81 98 99 /** 100 * @group check_is_friend 101 */ 102 public function test_check_is_friend_awaiting_response() { 103 $u1 = $this->create_user(); 104 $u2 = $this->create_user(); 105 friends_add_friend( $u1, $u2, false ); 106 $this->assertEquals( 'awaiting_response', BP_Friends_Friendship::check_is_friend( $u2, $u1 ) ); 107 } 108 109 /** 110 * @group check_is_friend 111 */ 112 public function test_check_is_friend_is_friend() { 113 $u1 = $this->create_user(); 114 $u2 = $this->create_user(); 115 friends_add_friend( $u1, $u2, true ); 116 $this->assertEquals( 'is_friend', BP_Friends_Friendship::check_is_friend( $u1, $u2 ) ); 117 } 82 118 }
Note: See TracChangeset
for help on using the changeset viewer.