Skip to content

Commit a6408fe

Browse files
authored
chore: fix tests for google/auth v1.33 (#2531)
1 parent a206b70 commit a6408fe

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

Diff for: composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "Apache-2.0",
88
"require": {
99
"php": "^7.4|^8.0",
10-
"google/auth": "^1.28",
10+
"google/auth": "^1.33",
1111
"google/apiclient-services": "~0.200",
1212
"firebase/php-jwt": "~6.0",
1313
"monolog/monolog": "^2.9||^3.0",
@@ -16,7 +16,7 @@
1616
"guzzlehttp/psr7": "^1.8.4||^2.2.1"
1717
},
1818
"require-dev": {
19-
"squizlabs/php_codesniffer": "^3.0",
19+
"squizlabs/php_codesniffer": "^3.8",
2020
"symfony/dom-crawler": "~2.1",
2121
"symfony/css-selector": "~2.1",
2222
"cache/filesystem-adapter": "^1.1",

Diff for: phpcs.xml.dist

+1-5
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,7 @@
148148
There MUST be one space between the closing parenthesis and the opening brace
149149
The structure body MUST be indented once
150150
The closing brace MUST be on the next line after the body -->
151-
<rule ref="Squiz.ControlStructures.ControlSignature">
152-
<properties>
153-
<property name="ignoreComments" value="true"/>
154-
</properties>
155-
</rule>
151+
<rule ref="Squiz.ControlStructures.ControlSignature" />
156152
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace">
157153
<exclude-pattern>src/aliases\.php</exclude-pattern>
158154
</rule>

Diff for: tests/Google/ClientTest.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -851,9 +851,12 @@ public function testCredentialsOptionWithCredentialsLoader()
851851
->willReturn('cache-key');
852852

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

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

0 commit comments

Comments
 (0)