Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions tests/Integration/Client/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function testSearchProjectsByType(): void
$this->assertFalse($projectList->hasPreviousPage());
}

public function testSearchProjectsByDownloadCount()
public function testSearchProjectsByDownloadCount(): void
{
$options = new ProjectSearchOptions();
$options->setFacets(new FacetANDGroup([
Expand Down Expand Up @@ -170,7 +170,7 @@ public function testGetProject(): void
}
}

public function testGetProjectVersionsAndDependencies()
public function testGetProjectVersionsAndDependencies(): void
{
$project = $this->apiClient->getProject("mclogs");
$this->assertNotEmpty($project->getDependencies());
Expand All @@ -183,7 +183,7 @@ public function testGetProjectVersionsAndDependencies()

}

public function testGetProjects()
public function testGetProjects(): void
{
$ids = ["6DdCzpTL", "VPo0otUH"];
$projects = $this->apiClient->getProjects($ids);
Expand All @@ -193,7 +193,7 @@ public function testGetProjects()
}
}

public function testGetRandomProjects()
public function testGetRandomProjects(): void
{
$this->markTestSkipped("Known issue: https://github.com/modrinth/labrinth/issues/548");
// $projects = $this->apiClient->getRandomProjects(5);
Expand All @@ -203,7 +203,7 @@ public function testGetRandomProjects()
// }
}

public function testCheckProjectValidity()
public function testCheckProjectValidity(): void
{
foreach (["mclogs", "6DdCzpTL", "motdgg", "VPo0otUH"] as $idOrSlug) {
$this->assertNotNull($this->apiClient->checkProjectValidity($idOrSlug));
Expand All @@ -212,15 +212,15 @@ public function testCheckProjectValidity()
$this->assertNull($this->apiClient->checkProjectValidity("i-really-hope-no-one-registers-this-slug"));
}

public function testGetVersion()
public function testGetVersion(): void
{
$version = $this->apiClient->getVersion("moYTqMH3");
$this->assertNotNull($version);
$this->assertEquals("VPo0otUH", $version->getData()->getProjectId());
$this->assertEquals("VPo0otUH", $version->getProject()->getData()->getId());
}

public function testGetVersions()
public function testGetVersions(): void
{
$ids = ["moYTqMH3", "gX3fbLHJ"];
$versions = $this->apiClient->getVersions($ids);
Expand All @@ -232,7 +232,7 @@ public function testGetVersions()
}
}

public function testGetVersionFromHash()
public function testGetVersionFromHash(): void
{
$hashes = [
HashAlgorithm::SHA1->value => "5952253d61e199e82eb852c5824c3981b29b209d",
Expand All @@ -247,7 +247,7 @@ public function testGetVersionFromHash()
}
}

public function testGetVersionsFromHashes()
public function testGetVersionsFromHashes(): void
{
$hashes = [
"6800de4cf254fd74e0e9b06b34dc87b16624ea838edc795321fb9d6777356d366b47bb1dc736bb6a700861f3619810bd190b10987a32f64dfd261a5d69a2bd8f",
Expand All @@ -263,7 +263,7 @@ public function testGetVersionsFromHashes()
}
}

public function testGetLatestVersionFromHash()
public function testGetLatestVersionFromHash(): void
{
$version = $this->apiClient->getLatestVersionFromHash(
"6800de4cf254fd74e0e9b06b34dc87b16624ea838edc795321fb9d6777356d366b47bb1dc736bb6a700861f3619810bd190b10987a32f64dfd261a5d69a2bd8f",
Expand All @@ -279,7 +279,7 @@ public function testGetLatestVersionFromHash()
);
}

public function testGetLatestVersionsFromHashes()
public function testGetLatestVersionsFromHashes(): void
{
$versions = $this->apiClient->getLatestVersionsFromHashes(
[
Expand All @@ -300,7 +300,7 @@ public function testGetLatestVersionsFromHashes()
}
}

public function testGetUser()
public function testGetUser(): void
{
$user = $this->apiClient->getUser("Julian");
$this->assertNotNull($user);
Expand All @@ -309,7 +309,7 @@ public function testGetUser()
$this->assertNotNull($projects);
}

public function testGetUsers()
public function testGetUsers(): void
{
$ids = ["b1AIbOxO", "ySB3MPni"];
$users = $this->apiClient->getUsers($ids);
Expand All @@ -319,7 +319,7 @@ public function testGetUsers()
}
}

public function testGetProjectMembers()
public function testGetProjectMembers(): void
{
$members = $this->apiClient->getProjectMembers("VPo0otUH");
$this->assertNotNull($members);
Expand All @@ -329,7 +329,7 @@ public function testGetProjectMembers()
}
}

public function testGetTeamMembers()
public function testGetTeamMembers(): void
{
$members = $this->apiClient->getTeamMembers("ThaUQrOs");
$this->assertNotEmpty($members);
Expand All @@ -338,7 +338,7 @@ public function testGetTeamMembers()
}
}

public function testGetTeams()
public function testGetTeams(): void
{
$teams = $this->apiClient->getTeams(["ThaUQrOs"]);
$this->assertNotEmpty($teams);
Expand All @@ -349,7 +349,7 @@ public function testGetTeams()
}
}

public function testGetCategories()
public function testGetCategories(): void
{
$items = $this->apiClient->getCategories();
$this->assertNotEmpty($items);
Expand All @@ -365,7 +365,7 @@ public function testGetCategories()
}
}

public function testGetLoaders()
public function testGetLoaders(): void
{
$items = $this->apiClient->getLoaders();
$this->assertNotEmpty($items);
Expand All @@ -381,7 +381,7 @@ public function testGetLoaders()
}
}

public function testGetGameVersions()
public function testGetGameVersions(): void
{
$gameVersions = $this->apiClient->getGameVersions();
$this->assertNotEmpty($gameVersions);
Expand All @@ -401,7 +401,7 @@ public function testGetGameVersions()
}
}

public function testGetLicenses()
public function testGetLicenses(): void
{
$items = $this->apiClient->getLicenses();
$this->assertNotEmpty($items);
Expand All @@ -417,7 +417,7 @@ public function testGetLicenses()
}
}

public function testGetDonationPlatforms()
public function testGetDonationPlatforms(): void
{
$items = $this->apiClient->getDonationPlatforms();
$this->assertNotEmpty($items);
Expand All @@ -427,7 +427,7 @@ public function testGetDonationPlatforms()
}
}

public function testGetReportTypes()
public function testGetReportTypes(): void
{
$items = $this->apiClient->getReportTypes();
$this->assertNotEmpty($items);
Expand Down