diff --git a/test/FeatureFlagLocalEvaluationTest.php b/test/FeatureFlagLocalEvaluationTest.php index 0a48f40..66580fc 100644 --- a/test/FeatureFlagLocalEvaluationTest.php +++ b/test/FeatureFlagLocalEvaluationTest.php @@ -1326,12 +1326,16 @@ public function testLoadFeatureFlags() public function testLoadFeatureFlagsWrongKey() { self::expectException(Exception::class); + $this->http_client = new MockedHttpClient( + host: "app.posthog.com", + flagEndpointResponse: ["detail" => "Invalid personal API key."] + ); $this->client = new Client( self::FAKE_API_KEY, [ "debug" => true, ], - null, + $this->http_client, self::FAKE_API_KEY ); PostHog::init(null, null, $this->client);