We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ea4c7e commit a9d53ccCopy full SHA for a9d53cc
tests/ValueObjects/Transporter/Headers.php
@@ -44,6 +44,18 @@
44
]);
45
});
46
47
+it('can have project', function () {
48
+ $headers = Headers::withAuthorization(ApiKey::from('foo'))
49
+ ->withContentType(ContentType::JSON)
50
+ ->withProject('openai_proj');
51
+
52
+ expect($headers->toArray())->toBe([
53
+ 'Authorization' => 'Bearer foo',
54
+ 'Content-Type' => 'application/json',
55
+ 'OpenAI-Project' => 'openai_proj',
56
+ ]);
57
+});
58
59
it('can have custom header', function () {
60
$headers = Headers::withAuthorization(ApiKey::from('foo'))
61
->withContentType(ContentType::JSON)
0 commit comments