Skip to content

Commit 8f7e447

Browse files
committed
Improve tests
1 parent 7f94154 commit 8f7e447

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

tests/Unit/Api/Group/ListNamesTest.php

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,32 @@ public function testListNamesReturnsCorrectResponse($expectedPath, $responseCode
4242
public static function getListNamesData(): array
4343
{
4444
return [
45-
'test with minimal parameters' => [
45+
'test without groups' => [
46+
'/groups.json',
47+
201,
48+
<<<JSON
49+
{
50+
"groups": []
51+
}
52+
JSON,
53+
[]
54+
],
55+
'test with multiple groups' => [
4656
'/groups.json',
4757
201,
4858
<<<JSON
4959
{
5060
"groups": [
51-
{
52-
"id": 1,
53-
"name": "Group 1"
54-
}
61+
{"id": 9, "name": "Group 1"},
62+
{"id": 8, "name": "Group 2"},
63+
{"id": 7, "name": "Group 3"}
5564
]
5665
}
5766
JSON,
5867
[
59-
1 => "Group 1",
68+
9 => "Group 1",
69+
8 => "Group 2",
70+
7 => "Group 3",
6071
]
6172
],
6273
];

0 commit comments

Comments
 (0)