diff --git a/src/main/php/com/openai/rest/OpenAIEndpoint.class.php b/src/main/php/com/openai/rest/OpenAIEndpoint.class.php index 5e4ca11..e69322b 100644 --- a/src/main/php/com/openai/rest/OpenAIEndpoint.class.php +++ b/src/main/php/com/openai/rest/OpenAIEndpoint.class.php @@ -3,7 +3,11 @@ use util\log\Traceable; use webservices\rest\Endpoint; -/** @test com.openai.unittest.OpenAIEndpointTest */ +/** + * OpenAI REST API endpoint + * + * @test com.openai.unittest.OpenAIEndpointTest + */ class OpenAIEndpoint implements Traceable { private $endpoint; diff --git a/src/test/php/com/openai/unittest/OpenAIEndpointTest.class.php b/src/test/php/com/openai/unittest/OpenAIEndpointTest.class.php index cc7003b..0d5518b 100644 --- a/src/test/php/com/openai/unittest/OpenAIEndpointTest.class.php +++ b/src/test/php/com/openai/unittest/OpenAIEndpointTest.class.php @@ -1,8 +1,9 @@ api('/chat/completions')->stream(['stream' => true])->result() ); } + + #[Test, Expect(UnexpectedStatus::class)] + public function invoke_non_existant_api() { + $endpoint= new OpenAIEndpoint($this->testingEndpoint()); + $endpoint->api('/non-exisant')->invoke([]); + } } \ No newline at end of file