removeFriend() public method

Removes a user as a friend
public removeFriend ( integer $friend_guid ) : boolean
$friend_guid integer The GUID of the user to remove
return boolean
コード例 #1
0
 public function testFriendSubscriptionRemovedWhenFriendRelationshipDeleted()
 {
     $this->user1->addFriend($this->user2->guid);
     $this->assertTrue($this->user1->isFriendsWith($this->user2->guid));
     elgg_add_subscription($this->user1->guid, 'test', $this->user2->guid);
     $this->assertIsA(check_entity_relationship($this->user1->guid, 'notifytest', $this->user2->guid), ElggRelationship::class);
     $this->user1->removeFriend($this->user2->guid);
     $this->assertFalse($this->user1->isFriendsWith($this->user2->guid));
     $this->assertFalse(check_entity_relationship($this->user1->guid, 'notifytest', $this->user2->guid));
 }