File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/platform/tests/Bridge/OpenAi/Gpt Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,17 @@ public function testThrowsBadRequestExceptionOnBadRequestResponse()
212
212
$ this ->expectException (BadRequestException::class);
213
213
$ this ->expectExceptionMessage ('Bad Request: invalid parameters ' );
214
214
215
+ $ converter ->convert (new RawHttpResult ($ httpResponse ));
216
+ }
217
+ public function testThrowsBadRequestExceptionOnBadRequestResponseWithNoResponseBody ()
218
+ {
219
+ $ converter = new ResultConverter ();
220
+ $ httpResponse = self ::createMock (ResponseInterface::class);
221
+ $ httpResponse ->method ('getStatusCode ' )->willReturn (400 );
222
+
223
+ $ this ->expectException (BadRequestException::class);
224
+ $ this ->expectExceptionMessage ('Bad Request ' );
225
+
215
226
$ converter ->convert (new RawHttpResult ($ httpResponse ));
216
227
}
217
228
}
You can’t perform that action at this time.
0 commit comments