@@ -14,11 +14,11 @@ public function user_can_send_a_friend_request()
14
14
15
15
$ sender ->addFriend ($ recipient );
16
16
17
- $ this ->assertCount (1 , $ recipient ->friendRequestsTo ());
18
- $ this ->assertCount (1 , $ sender ->friendRequestsFrom ());
17
+ $ this ->assertCount (1 , $ recipient ->friendRequestsReceived ());
18
+ $ this ->assertCount (1 , $ sender ->friendRequestsSent ());
19
19
20
- $ this ->assertNotTrue ( $ sender ->isFriendWith ($ recipient ));
21
- $ this ->assertNotTrue ( $ recipient ->isFriendWith ($ sender ));
20
+ $ this ->assertNotTrue ( $ sender ->isFriendsWith ($ recipient ));
21
+ $ this ->assertNotTrue ( $ recipient ->isFriendsWith ($ sender ));
22
22
}
23
23
24
24
/** @test */
@@ -31,7 +31,7 @@ public function user_can_not_send_a_friend_request_if_frienship_is_pending()
31
31
$ sender ->addFriend ($ recipient );
32
32
$ sender ->addFriend ($ recipient );
33
33
34
- $ this ->assertCount (1 , $ recipient ->friendRequestsTo ());
34
+ $ this ->assertCount (1 , $ recipient ->friendRequestsReceived ());
35
35
}
36
36
37
37
/** @test */
@@ -43,10 +43,10 @@ public function user_can_send_a_friend_request_if_frienship_is_denied()
43
43
$ sender ->addFriend ($ recipient );
44
44
45
45
$ recipient ->deleteFriend ($ sender );
46
- $ this ->assertCount (0 , $ recipient ->friendRequestsTo ());
46
+ $ this ->assertCount (0 , $ recipient ->friendRequestsReceived ());
47
47
48
48
$ sender ->addFriend ($ recipient );
49
- $ this ->assertCount (1 , $ recipient ->friendRequestsTo ());
49
+ $ this ->assertCount (1 , $ recipient ->friendRequestsReceived ());
50
50
}
51
51
52
52
/** @test */
@@ -57,10 +57,10 @@ public function user_can_remove_a_friend_request()
57
57
58
58
$ sender ->addFriend ($ recipient );
59
59
$ sender ->deleteFriend ($ recipient );
60
- $ this ->assertCount (0 , $ recipient ->friendRequestsTo ());
60
+ $ this ->assertCount (0 , $ recipient ->friendRequestsReceived ());
61
61
62
62
$ sender ->addFriend ($ recipient );
63
- $ this ->assertCount (1 , $ recipient ->friendRequestsTo ());
63
+ $ this ->assertCount (1 , $ recipient ->friendRequestsReceived ());
64
64
65
65
$ recipient ->acceptfriend ($ sender );
66
66
$ this ->assertEquals ('friends ' , $ recipient ->checkFriendship ($ sender ));
@@ -87,8 +87,8 @@ public function user_can_not_send_a_friend_request_to_himself()
87
87
$ user = factory (User::class)->create ();
88
88
$ user ->addFriend ($ user );
89
89
90
- $ this ->assertCount (0 , $ user ->friendRequestsTo ());
91
- $ this ->assertCount (0 , $ user ->friendRequestsFrom ());
90
+ $ this ->assertCount (0 , $ user ->friendRequestsReceived ());
91
+ $ this ->assertCount (0 , $ user ->friendRequestsSent ());
92
92
}
93
93
94
94
/** @test */
@@ -103,8 +103,8 @@ public function user_is_friend_with_another_user_if_accepts_a_friend_request()
103
103
$ this ->assertEquals ('friends ' , $ recipient ->checkFriendship ($ sender ));
104
104
$ this ->assertEquals ('friends ' , $ sender ->checkFriendship ($ recipient ));
105
105
106
- $ this ->assertTrue ( $ sender ->isFriendWith ($ recipient ));
107
- $ this ->assertTrue ( $ recipient ->isFriendWith ($ sender ));
106
+ $ this ->assertTrue ( $ sender ->isFriendsWith ($ recipient ));
107
+ $ this ->assertTrue ( $ recipient ->isFriendsWith ($ sender ));
108
108
}
109
109
110
110
/** @test */
@@ -116,8 +116,8 @@ public function user_has_not_friend_request_from_if_he_accepted_the_friend_reque
116
116
$ sender ->addFriend ($ recipient );
117
117
$ recipient ->acceptFriend ($ sender );
118
118
119
- $ this ->assertCount (0 , $ recipient ->friendRequestsTo ());
120
- $ this ->assertCount (0 , $ sender ->friendRequestsFrom ());
119
+ $ this ->assertCount (0 , $ recipient ->friendRequestsReceived ());
120
+ $ this ->assertCount (0 , $ sender ->friendRequestsSent ());
121
121
}
122
122
123
123
/** @test */
@@ -184,8 +184,8 @@ public function it_returns_friend_requests_from_user()
184
184
185
185
$ recipients [0 ]->acceptFriend ($ sender );
186
186
187
- $ this ->assertCount (2 , $ sender ->friendRequestsFrom ());
188
- $ this ->containsOnlyInstancesOf (\App \User::class, $ sender ->friendRequestsFrom ());
187
+ $ this ->assertCount (2 , $ sender ->friendRequestsSent ());
188
+ $ this ->containsOnlyInstancesOf (\App \User::class, $ sender ->friendRequestsSent ());
189
189
}
190
190
191
191
/** @test */
@@ -200,7 +200,7 @@ public function it_returns_friend_requests_to_user()
200
200
201
201
$ recipient ->acceptFriend ($ senders [0 ]);
202
202
203
- $ this ->assertCount (2 , $ recipient ->friendRequestsTo ());
204
- $ this ->containsOnlyInstancesOf (\App \User::class, $ recipient ->friendRequestsTo ());
203
+ $ this ->assertCount (2 , $ recipient ->friendRequestsReceived ());
204
+ $ this ->containsOnlyInstancesOf (\App \User::class, $ recipient ->friendRequestsReceived ());
205
205
}
206
206
}
0 commit comments