Skip to content

Commit

Permalink
chore: fix tests for google/auth v1.33 (#2531)
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer authored Dec 15, 2023
1 parent a206b70 commit a6408fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "Apache-2.0",
"require": {
"php": "^7.4|^8.0",
"google/auth": "^1.28",
"google/auth": "^1.33",
"google/apiclient-services": "~0.200",
"firebase/php-jwt": "~6.0",
"monolog/monolog": "^2.9||^3.0",
Expand All @@ -16,7 +16,7 @@
"guzzlehttp/psr7": "^1.8.4||^2.2.1"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.0",
"squizlabs/php_codesniffer": "^3.8",
"symfony/dom-crawler": "~2.1",
"symfony/css-selector": "~2.1",
"cache/filesystem-adapter": "^1.1",
Expand Down
6 changes: 1 addition & 5 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,7 @@
There MUST be one space between the closing parenthesis and the opening brace
The structure body MUST be indented once
The closing brace MUST be on the next line after the body -->
<rule ref="Squiz.ControlStructures.ControlSignature">
<properties>
<property name="ignoreComments" value="true"/>
</properties>
</rule>
<rule ref="Squiz.ControlStructures.ControlSignature" />
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace">
<exclude-pattern>src/aliases\.php</exclude-pattern>
</rule>
Expand Down
7 changes: 5 additions & 2 deletions tests/Google/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -851,9 +851,12 @@ public function testCredentialsOptionWithCredentialsLoader()
->willReturn('cache-key');

// Ensure the access token provided by our credentials loader is used
$credentials->fetchAuthToken(Argument::any())
$credentials->updateMetadata([], null, Argument::any())
->shouldBeCalledOnce()
->willReturn(['access_token' => 'abc']);
->willReturn(['authorization' => 'Bearer abc']);
$credentials->getLastReceivedToken()
->shouldBeCalledTimes(2)
->willReturn(null);

$client = new Client(['credentials' => $credentials->reveal()]);

Expand Down

0 comments on commit a6408fe

Please sign in to comment.