Closed elodieirdor closed 7 months ago
Thank you @elodieirdor
I missed them completely 🙈
Thanks for the merged! Happy to contribute to this great package!! Just realized I broke the tests. Sorry about that! Happy to do a PR with a fix.
Would that be ok if I update OpenAI\Testing\Resources\Concerns\Testable.php
with the following
protected function record(string $method, ...$parameters): ResponseContract|StreamResponse|string
{
return $this->fake->record(new TestRequest($this->resource(), $method, $parameters));
}
Or, I can update each new resource class and send an array ['paramName' => value] to record
Example for create in OpenAI\Testing\Resources\AssistantsFilesTestResource
public function create(string $assistantId, array $parameters): AssistantFileResponse
{
return $this->record(__FUNCTION__, ['assistantId' => $assistantId, 'parameters' => $parameters]);
}
No problem.
I am already working on this one. I've done basically what you have suggested now. Additionally I am going to add the missing tests for the test resources.
Awesome ❤️ . Thank you!
Here is my commit: https://github.com/openai-php/client/commit/da395239f6df941ac17261c054ed5d784890af34
I will tag a new release tomorrow.
Great!! Thanks.
What:
Description:
This PR adds test resources for Assistants and Threads.
Related: