From dfc491ec8f4b2f352e7b3680d8ff98495be6e618 Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Mon, 19 Oct 2026 16:01:09 +0200 Subject: [PATCH] pass the configuration by name in the boolean query parameter test --- tests/Unit/Client/HangarAPIClientTest.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/Unit/Client/HangarAPIClientTest.php b/tests/Unit/Client/HangarAPIClientTest.php index 7f82a04..9def225 100644 --- a/tests/Unit/Client/HangarAPIClientTest.php +++ b/tests/Unit/Client/HangarAPIClientTest.php @@ -22,10 +22,6 @@ use Aternos\HangarApi\Model\ProjectMember; use Aternos\HangarApi\Model\Tag; use Composer\InstalledVersions; -use GuzzleHttp\Client; -use GuzzleHttp\Handler\MockHandler; -use GuzzleHttp\HandlerStack; -use GuzzleHttp\Middleware; use GuzzleHttp\Psr7\Response; class HangarAPIClientTest extends ClientTestCase @@ -129,9 +125,10 @@ public function testGetProjects(): void */ public function testBooleanQueryParametersAreSentAsStringWithCustomConfiguration(): void { - $stack = HandlerStack::create(new MockHandler([new Response(200, [], file_get_contents(__DIR__ . "/Fixtures/getProjects.json"))])); - $stack->push(Middleware::history($this->requests)); - $client = new HangarAPIClient(new Configuration(), httpClient: new Client(['handler' => $stack])); + $client = $this->createClient( + [new Response(200, [], file_get_contents(__DIR__ . "/Fixtures/getProjects.json"))], + configuration: new Configuration(), + ); $client->getProjects(new ProjectSearchOptions()->setPrioritizeExactMatch(false));