Skip to content

Commit 87aed52

Browse files
committed
updated tests for contacts resource
1 parent a39586c commit 87aed52

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/Resources/Contacts.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ protected function getParams(array $params, int $perPage): string
4949
{
5050
$skip = $params['skip'] ?? 0;
5151
$page = request('p', $skip);
52-
// if ($page > 0) {
53-
// $page--;
54-
// }
5552

5653
if ($params == []) {
5754
$params = http_build_query([

tests/Resources/ContactsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
test('getParams returns default values when no params provided', function () {
3838

39-
$contacts = new Contacts();
39+
$contacts = new Contacts;
4040
$reflection = new ReflectionMethod(Contacts::class, 'getParams');
4141
$response = $reflection->invoke($contacts, [], 25);
4242

@@ -51,7 +51,7 @@
5151
});
5252

5353
test('getParams includes custom top parameter', function () {
54-
$contacts = new Contacts();
54+
$contacts = new Contacts;
5555
$reflection = new ReflectionMethod(Contacts::class, 'getParams');
5656
$response = $reflection->invoke($contacts, ['$top' => 10], 25);
5757

@@ -65,7 +65,7 @@
6565
});
6666

6767
test('getParams includes custom skip parameter', function () {
68-
$contacts = new Contacts();
68+
$contacts = new Contacts;
6969
$reflection = new ReflectionMethod(Contacts::class, 'getParams');
7070
$response = $reflection->invoke($contacts, ['$skip' => 15], 25);
7171

@@ -79,7 +79,7 @@
7979
});
8080

8181
test('getParams forces count to be true when missing', function () {
82-
$contacts = new Contacts();
82+
$contacts = new Contacts;
8383
$reflection = new ReflectionMethod(Contacts::class, 'getParams');
8484
$response = $reflection->invoke($contacts, ['$top' => 10, '$skip' => 5], 25);
8585

0 commit comments

Comments
 (0)