Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix tests for google/auth v1.33 #2531

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading