@@ -99,6 +99,12 @@ public function testGetGame()
99
99
$ game = $ this ->apiClient ->getGame (static ::MINECRAFT_GAME_ID );
100
100
$ this ->assertEquals (static ::MINECRAFT_GAME_ID , $ game ->getData ()->getId ());
101
101
$ this ->assertEquals ("Minecraft " , $ game ->getData ()->getName ());
102
+
103
+ $ versions = $ game ->getVersions ();
104
+ $ this ->assertNotEmpty ($ versions );
105
+
106
+ $ categories = $ game ->getCategories ();
107
+ $ this ->assertNotEmpty ($ categories );
102
108
}
103
109
104
110
/**
@@ -230,6 +236,13 @@ public function testSearchMods()
230
236
$ this ->assertEquals (static ::MINECRAFT_GAME_ID , $ mod ->getData ()->getGameId ());
231
237
}
232
238
239
+ $ this ->assertNull ($ mods ->getPreviousPage ());
240
+
241
+ $ mods = $ mods ->getNextPage ();
242
+ foreach ($ mods as $ mod ) {
243
+ $ this ->assertEquals (static ::MINECRAFT_GAME_ID , $ mod ->getData ()->getGameId ());
244
+ }
245
+
233
246
$ game = $ this ->apiClient ->getGame (static ::MINECRAFT_GAME_ID );
234
247
$ mods = $ game ->searchMods ();
235
248
$ this ->assertNotEmpty ($ mods );
@@ -297,7 +310,9 @@ public function testGetMod()
297
310
$ mod = $ this ->apiClient ->getMod (static ::MCLOGS_MOD_ID );
298
311
299
312
$ this ->assertEquals (static ::MCLOGS_MOD_ID , $ mod ->getData ()->getId ());
313
+ $ this ->assertEquals (static ::MINECRAFT_GAME_ID , $ mod ->getGame ()->getData ()->getId ());
300
314
$ this ->assertEquals (static ::MCLOGS_PRIMARY_CATEGORY_ID , $ mod ->getPrimaryCategory ()->getData ()->getId ());
315
+ $ this ->assertEquals (static ::MODS_CATEGORY_ID , $ mod ->getCategoryClass ()->getData ()->getId ());
301
316
}
302
317
303
318
/**
@@ -353,10 +368,17 @@ public function testGetModFile()
353
368
$ mod = $ this ->apiClient ->getMod (static ::MCLOGS_MOD_ID );
354
369
355
370
$ file = $ mod ->getMainFile ();
371
+
372
+
373
+ $ this ->assertEquals ($ mod , $ file ->getMod ());
374
+
356
375
$ this ->assertEquals ($ mod ->getData ()->getMainFileId (), $ file ->getData ()->getId ());
357
376
$ this ->assertNotNull ($ file ->getChangelog ());
377
+
358
378
$ this ->assertTrue ($ mod ->getData ()->getAllowModDistribution ());
359
379
$ this ->assertNotEmpty ($ this ->apiClient ->getModFileDownloadURL ($ mod ->getData ()->getId (), $ file ->getData ()->getId ()));
380
+
381
+ $ this ->assertNull ($ file ->getServerPack ());
360
382
}
361
383
362
384
/**
0 commit comments