From 0b1fd8cee0f70a1e8a0b7c64e9deb3ee9596d342 Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Tue, 11 Nov 2025 16:24:04 +0100 Subject: [PATCH] add method return type void to all test functions in ClientTest.php --- tests/Integration/Client/ClientTest.php | 47 +++++++++++++------------ 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/tests/Integration/Client/ClientTest.php b/tests/Integration/Client/ClientTest.php index 494d6af..918b18e 100644 --- a/tests/Integration/Client/ClientTest.php +++ b/tests/Integration/Client/ClientTest.php @@ -116,7 +116,8 @@ public function testSearchProjectsByType(): void $this->assertFalse($projectList->hasPreviousPage()); } - public function testSearchProjectsByDownloadCount() { + public function testSearchProjectsByDownloadCount(): void + { $options = new ProjectSearchOptions(); $options->setFacets(new FacetANDGroup([ new FacetORGroup([ @@ -168,7 +169,7 @@ public function testGetProject(): void } } - public function testGetProjectVersionsAndDependencies() + public function testGetProjectVersionsAndDependencies(): void { $project = $this->apiClient->getProject("mclogs"); $this->assertNotEmpty($project->getDependencies()); @@ -181,7 +182,7 @@ public function testGetProjectVersionsAndDependencies() } - public function testGetProjects() + public function testGetProjects(): void { $ids = ["6DdCzpTL", "VPo0otUH"]; $projects = $this->apiClient->getProjects($ids); @@ -191,7 +192,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); @@ -201,7 +202,7 @@ public function testGetRandomProjects() // } } - public function testCheckProjectValidity() + public function testCheckProjectValidity(): void { foreach (["mclogs", "6DdCzpTL", "motdgg", "VPo0otUH"] as $idOrSlug) { $this->assertNotNull($this->apiClient->checkProjectValidity($idOrSlug)); @@ -210,7 +211,7 @@ 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); @@ -218,7 +219,7 @@ public function testGetVersion() $this->assertEquals("VPo0otUH", $version->getProject()->getData()->getId()); } - public function testGetVersions() + public function testGetVersions(): void { $ids = ["moYTqMH3", "gX3fbLHJ"]; $versions = $this->apiClient->getVersions($ids); @@ -230,7 +231,7 @@ public function testGetVersions() } } - public function testGetVersionFromHash() + public function testGetVersionFromHash(): void { $hashes = [ HashAlgorithm::SHA1->value => "5952253d61e199e82eb852c5824c3981b29b209d", @@ -245,7 +246,7 @@ public function testGetVersionFromHash() } } - public function testGetVersionsFromHashes() + public function testGetVersionsFromHashes(): void { $hashes = [ "6800de4cf254fd74e0e9b06b34dc87b16624ea838edc795321fb9d6777356d366b47bb1dc736bb6a700861f3619810bd190b10987a32f64dfd261a5d69a2bd8f", @@ -261,7 +262,7 @@ public function testGetVersionsFromHashes() } } - public function testGetLatestVersionFromHash() + public function testGetLatestVersionFromHash(): void { $version = $this->apiClient->getLatestVersionFromHash( "6800de4cf254fd74e0e9b06b34dc87b16624ea838edc795321fb9d6777356d366b47bb1dc736bb6a700861f3619810bd190b10987a32f64dfd261a5d69a2bd8f", @@ -277,7 +278,7 @@ public function testGetLatestVersionFromHash() ); } - public function testGetLatestVersionsFromHashes() + public function testGetLatestVersionsFromHashes(): void { $versions = $this->apiClient->getLatestVersionsFromHashes( [ @@ -298,7 +299,7 @@ public function testGetLatestVersionsFromHashes() } } - public function testGetUser() + public function testGetUser(): void { $user = $this->apiClient->getUser("Julian"); $this->assertNotNull($user); @@ -307,7 +308,7 @@ public function testGetUser() $this->assertNotNull($projects); } - public function testGetUsers() + public function testGetUsers(): void { $ids = ["b1AIbOxO", "ySB3MPni"]; $users = $this->apiClient->getUsers($ids); @@ -317,7 +318,7 @@ public function testGetUsers() } } - public function testGetProjectMembers() + public function testGetProjectMembers(): void { $members = $this->apiClient->getProjectMembers("VPo0otUH"); $this->assertNotNull($members); @@ -327,7 +328,7 @@ public function testGetProjectMembers() } } - public function testGetTeamMembers() + public function testGetTeamMembers(): void { $members = $this->apiClient->getTeamMembers("ThaUQrOs"); $this->assertNotEmpty($members); @@ -336,7 +337,7 @@ public function testGetTeamMembers() } } - public function testGetTeams() + public function testGetTeams(): void { $teams = $this->apiClient->getTeams(["ThaUQrOs"]); $this->assertNotEmpty($teams); @@ -347,7 +348,7 @@ public function testGetTeams() } } - public function testGetCategories() + public function testGetCategories(): void { $items = $this->apiClient->getCategories(); $this->assertNotEmpty($items); @@ -363,7 +364,7 @@ public function testGetCategories() } } - public function testGetLoaders() + public function testGetLoaders(): void { $items = $this->apiClient->getLoaders(); $this->assertNotEmpty($items); @@ -379,7 +380,7 @@ public function testGetLoaders() } } - public function testGetGameVersions() + public function testGetGameVersions(): void { $items = $this->apiClient->getGameVersions(); $this->assertNotEmpty($items); @@ -395,7 +396,7 @@ public function testGetGameVersions() } } - public function testGetLicenses() + public function testGetLicenses(): void { $items = $this->apiClient->getLicenses(); $this->assertNotEmpty($items); @@ -411,7 +412,7 @@ public function testGetLicenses() } } - public function testGetDonationPlatforms() + public function testGetDonationPlatforms(): void { $items = $this->apiClient->getDonationPlatforms(); $this->assertNotEmpty($items); @@ -421,7 +422,7 @@ public function testGetDonationPlatforms() } } - public function testGetReportTypes() + public function testGetReportTypes(): void { $items = $this->apiClient->getReportTypes(); $this->assertNotEmpty($items); @@ -430,4 +431,4 @@ public function testGetReportTypes() $this->assertNotNull($item); } } -} \ No newline at end of file +}