@@ -148,37 +148,37 @@ public function test_getReceivedReview_can_retrieve_unapproved_review_when_inclu
148
148
$ this ->assertEquals (3 , $ review ->rating );
149
149
}
150
150
151
- public function test_getLatestReceivedReviews_retrieves_latest_approved_reviews_by_default ()
151
+ public function test_latestReceivedReviews_retrieves_latest_approved_reviews_by_default ()
152
152
{
153
153
$ newMentee = Mentor::factory ()->create ();
154
154
155
155
$ newReview = $ newMentee ->review ($ this ->mentor , 4 , 'nice!!! ' );
156
156
157
- $ reviews = $ this ->mentor ->getLatestReceivedReviews ();
157
+ $ reviews = $ this ->mentor ->latestReceivedReviews ()-> get ();
158
158
159
159
$ this ->assertCount (3 , $ reviews );
160
160
$ this ->assertEquals ($ reviews ->first ()->id , $ newReview ->id );
161
161
}
162
162
163
- public function test_getLatestReceivedReviews_not_returning_unapproved_reviews_by_default ()
163
+ public function test_latestReceivedReviews_not_returning_unapproved_reviews_by_default ()
164
164
{
165
165
$ newMentee = Mentor::factory ()->create ();
166
166
167
167
$ newReview = $ newMentee ->review ($ this ->mentor , 4 , 'nice!!! ' , isApproved: false );
168
168
169
- $ reviews = $ this ->mentor ->getLatestReceivedReviews ();
169
+ $ reviews = $ this ->mentor ->latestReceivedReviews ()-> get ();
170
170
171
171
$ this ->assertCount (2 , $ reviews );
172
172
$ this ->assertNotEquals ($ reviews ->first ()->id , $ newReview ->id );
173
173
}
174
174
175
- public function test_getLatestReceivedReviews_can_retrieves_unapproved_reviews_when_includeUnapproved_is_true ()
175
+ public function test_latestReceivedReviews_can_retrieves_unapproved_reviews_when_includeUnapproved_is_true ()
176
176
{
177
177
$ newMentee = Mentor::factory ()->create ();
178
178
179
179
$ newReview = $ newMentee ->review ($ this ->mentor , 4 , 'nice!!! ' , isApproved: false );
180
180
181
- $ reviews = $ this ->mentor ->getLatestReceivedReviews (includeUnapproved: true );
181
+ $ reviews = $ this ->mentor ->latestReceivedReviews (includeUnapproved: true )-> get ( );
182
182
183
183
$ this ->assertCount (3 , $ reviews );
184
184
$ this ->assertEquals ($ reviews ->first ()->id , $ newReview ->id );
0 commit comments