Skip to content

Commit

Permalink
update OAuthTest
Browse files Browse the repository at this point in the history
  • Loading branch information
bkdotcom committed Oct 18, 2024
1 parent fd47833 commit 1548713
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/Debug/Collector/OAuthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function testGetAccessToken()
), $response);
$logEntries = $this->getLogEntries();
$logEntries[3]['args'][1] = \array_intersect_key($logEntries[3]['args'][1], \array_flip(['size_download', 'sbs']));

$this->assertLogEntries(array(
array(
'method' => 'groupCollapsed',
Expand Down Expand Up @@ -96,7 +97,7 @@ public function testGetAccessToken()
'method' => 'log',
'args' => array(
'request headers',
'Authorization: OAuth oauth_consumer_key="key",oauth_signature_method="HMAC-SHA1",oauth_nonce="%s",oauth_timestamp="%d",oauth_version="1.0",oauth_signature="█████████"',
'%AAuthorization: OAuth oauth_consumer_key="key",oauth_signature_method="HMAC-SHA1",oauth_nonce="%s",oauth_timestamp="%d",oauth_version="1.0",oauth_signature="█████████"%A',
),
'meta' => array(
'channel' => 'general.OAuth',
Expand Down Expand Up @@ -244,7 +245,7 @@ public function testGetRequestToken()
'method' => 'log',
'args' => array(
'request headers',
'Authorization: OAuth oauth_callback="http%3A%2F%2Fwww.bradkent.com%2F",oauth_consumer_key="key",oauth_signature_method="HMAC-SHA1",oauth_nonce="%s",oauth_timestamp="%d",oauth_version="1.0",oauth_signature="█████████"',
'%AAuthorization: OAuth oauth_callback="http%3A%2F%2Fwww.bradkent.com%2F",oauth_consumer_key="key",oauth_signature_method="HMAC-SHA1",oauth_nonce="%s",oauth_timestamp="%d",oauth_version="1.0",oauth_signature="█████████"%A',
),
'meta' => array(
'channel' => 'general.OAuth',
Expand Down Expand Up @@ -385,10 +386,10 @@ public function testFetch()
'method' => 'log',
'args' => array(
'request headers',
implode('%A' . "\n", array(
'%A' . implode('%A' . "\n", array(
'Authorization: OAuth oauth_consumer_key="key",oauth_signature_method="HMAC-SHA1",oauth_nonce="%s",oauth_timestamp="%d",oauth_version="1.0",oauth_signature="█████████"',
'Content-Type: application/x-www-form-urlencoded',
)),
)) . '%A',
),
'meta' => array(
'channel' => 'general.OAuth',
Expand Down

0 comments on commit 1548713

Please sign in to comment.