Skip to content

Commit 2db7ef7

Browse files
chore: added test for basic auth in GuzzleClientTest.php
1 parent 8ac753d commit 2db7ef7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/Twilio/Unit/Http/GuzzleClientTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@ public function testPostMethod(): void {
5656
$this->assertFalse($options['allow_redirects']);
5757
}
5858

59+
public function testBasicAuth(): void
60+
{
61+
$this->mockHandler->append(new Response());
62+
$response = $this->client->request('POST',
63+
'https://www.whatever.com',
64+
['myquerykey' => 'myqueryvalue'],
65+
['myparamkey' => 'myparamvalue'],
66+
[],
67+
"user",
68+
"password"
69+
);
70+
$this->assertSame([], $response->getHeaders());
71+
}
72+
5973
public function testAuthStrategy(): void
6074
{
6175
$this->mockHandler->append(new Response());

0 commit comments

Comments
 (0)