Skip to content

Commit a9d53cc

Browse files
Update Headers.php
1 parent 6ea4c7e commit a9d53cc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/ValueObjects/Transporter/Headers.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@
4444
]);
4545
});
4646

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+
4759
it('can have custom header', function () {
4860
$headers = Headers::withAuthorization(ApiKey::from('foo'))
4961
->withContentType(ContentType::JSON)

0 commit comments

Comments
 (0)