From 2d4bcb54dd5c42fbf35b6ee513879649e3cc865c Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Mon, 9 Feb 2026 04:59:45 -0800 Subject: [PATCH 1/2] chore(tests): organize fixtures into a single test directory --- tests/AccessTokenTest.php | 8 +-- tests/ApplicationDefaultCredentialsTest.php | 54 +++++++++---------- .../ServiceAccountCredentialsTest.php | 14 ++--- ...ServiceAccountJwtAccessCredentialsTest.php | 12 ++--- .../UserRefreshCredentialsTest.php | 10 ++-- tests/CredentialsLoaderTest.php | 18 +++---- tests/FetchAuthTokenCacheTest.php | 2 +- tests/FetchAuthTokenTest.php | 6 +-- tests/OAuth2Test.php | 34 ++++++------ tests/ObservabilityMetricsTest.php | 12 ++--- tests/ServiceAccountSignerTraitTest.php | 2 +- tests/fixtures/{ => fixtures1}/.config/gcloud | 0 .../{ => fixtures1}/federated-certs.json | 0 .../application_default_credentials.json | 0 tests/fixtures/{ => fixtures1}/private.json | 0 tests/fixtures/{ => fixtures1}/private.pem | 0 tests/fixtures/{ => fixtures1}/public.pem | 0 tests/{ => fixtures}/fixtures2/.config/gcloud | 0 tests/{ => fixtures}/fixtures2/gcloud.json | 0 .../application_default_credentials.json | 0 tests/{ => fixtures}/fixtures2/private.json | 0 .../fixtures2/valid_oauth_creds.json | 0 tests/{ => fixtures}/fixtures3/key.pub | 0 .../service_account_credentials.json | 0 .../context_aware_metadata.json | 0 .../context_aware_metadata.json | 0 .../context_aware_metadata.json | 0 .../context_aware_metadata.json | 0 .../context_aware_metadata.json | 0 tests/{ => fixtures}/fixtures5/.config/gcloud | 0 .../application_default_credentials.json | 0 .../fixtures6/aws_credentials.json | 0 .../fixtures6/executable_credentials.json | 0 .../fixtures6/file_credentials.json | 0 .../fixtures6/url_credentials.json | 0 tests/{ => fixtures}/fixtures7/env.json | 0 tests/{ => fixtures}/fixtures7/getenv.json | 0 37 files changed, 87 insertions(+), 85 deletions(-) rename tests/fixtures/{ => fixtures1}/.config/gcloud (100%) rename tests/fixtures/{ => fixtures1}/federated-certs.json (100%) rename tests/fixtures/{ => fixtures1}/gcloud/application_default_credentials.json (100%) rename tests/fixtures/{ => fixtures1}/private.json (100%) rename tests/fixtures/{ => fixtures1}/private.pem (100%) rename tests/fixtures/{ => fixtures1}/public.pem (100%) rename tests/{ => fixtures}/fixtures2/.config/gcloud (100%) rename tests/{ => fixtures}/fixtures2/gcloud.json (100%) rename tests/{ => fixtures}/fixtures2/gcloud/application_default_credentials.json (100%) rename tests/{ => fixtures}/fixtures2/private.json (100%) rename tests/{ => fixtures}/fixtures2/valid_oauth_creds.json (100%) rename tests/{ => fixtures}/fixtures3/key.pub (100%) rename tests/{ => fixtures}/fixtures3/service_account_credentials.json (100%) rename tests/{ => fixtures}/fixtures4/invalidcmd/.secureConnect/context_aware_metadata.json (100%) rename tests/{ => fixtures}/fixtures4/invalidjson/.secureConnect/context_aware_metadata.json (100%) rename tests/{ => fixtures}/fixtures4/invalidkey/.secureConnect/context_aware_metadata.json (100%) rename tests/{ => fixtures}/fixtures4/invalidvalue/.secureConnect/context_aware_metadata.json (100%) rename tests/{ => fixtures}/fixtures4/valid/.secureConnect/context_aware_metadata.json (100%) rename tests/{ => fixtures}/fixtures5/.config/gcloud (100%) rename tests/{ => fixtures}/fixtures5/gcloud/application_default_credentials.json (100%) rename tests/{ => fixtures}/fixtures6/aws_credentials.json (100%) rename tests/{ => fixtures}/fixtures6/executable_credentials.json (100%) rename tests/{ => fixtures}/fixtures6/file_credentials.json (100%) rename tests/{ => fixtures}/fixtures6/url_credentials.json (100%) rename tests/{ => fixtures}/fixtures7/env.json (100%) rename tests/{ => fixtures}/fixtures7/getenv.json (100%) diff --git a/tests/AccessTokenTest.php b/tests/AccessTokenTest.php index 059e9176b9..d18f5c38aa 100644 --- a/tests/AccessTokenTest.php +++ b/tests/AccessTokenTest.php @@ -293,7 +293,7 @@ public function provideCertsFromUrl() public function testRetrieveCertsFromLocationLocalFile() { - $certsLocation = __DIR__ . '/fixtures/federated-certs.json'; + $certsLocation = __DIR__ . '/fixtures/fixtures1/federated-certs.json'; $certsData = json_decode(file_get_contents($certsLocation), true); $item = $this->prophesize('Psr\Cache\CacheItemInterface'); @@ -336,7 +336,7 @@ public function testRetrieveCertsFromLocationLocalFileInvalidFilePath() $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Failed to retrieve verification certificates from path'); - $certsLocation = __DIR__ . '/fixtures/federated-certs-does-not-exist.json'; + $certsLocation = __DIR__ . '/fixtures/fixtures1/federated-certs-does-not-exist.json'; $item = $this->prophesize('Psr\Cache\CacheItemInterface'); $item->get() @@ -409,7 +409,7 @@ public function testRetrieveCertsFromLocationLocalFileInvalidFileData() public function testRetrieveCertsFromLocationRespectsCacheControl() { - $certsLocation = __DIR__ . '/fixtures/federated-certs.json'; + $certsLocation = __DIR__ . '/fixtures/fixtures1/federated-certs.json'; $certsJson = file_get_contents($certsLocation); $certsData = json_decode($certsJson, true); @@ -454,7 +454,7 @@ public function testRetrieveCertsFromLocationRespectsCacheControl() public function testRetrieveCertsFromLocationRemote() { - $certsLocation = __DIR__ . '/fixtures/federated-certs.json'; + $certsLocation = __DIR__ . '/fixtures/fixtures1/federated-certs.json'; $certsJson = file_get_contents($certsLocation); $certsData = json_decode($certsJson, true); diff --git a/tests/ApplicationDefaultCredentialsTest.php b/tests/ApplicationDefaultCredentialsTest.php index d973a16893..82f1ae3c8b 100644 --- a/tests/ApplicationDefaultCredentialsTest.php +++ b/tests/ApplicationDefaultCredentialsTest.php @@ -54,14 +54,14 @@ public function testGetCredentialsFailsIfEnvSpecifiesNonExistentFile() { $this->expectException(DomainException::class); - $keyFile = __DIR__ . '/fixtures' . '/does-not-exist-private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/does-not-exist-private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); ApplicationDefaultCredentials::getCredentials('a scope'); } public function testLoadsOKIfEnvSpecifiedIsValid() { - $keyFile = __DIR__ . '/fixtures' . '/private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $this->assertNotNull( ApplicationDefaultCredentials::getCredentials('a scope') @@ -70,7 +70,7 @@ public function testLoadsOKIfEnvSpecifiedIsValid() public function testLoadsDefaultFileIfPresentAndEnvVarIsNotSet() { - setHomeEnv(__DIR__ . '/fixtures'); + setHomeEnv(__DIR__ . '/fixtures/fixtures1'); $this->assertNotNull( ApplicationDefaultCredentials::getCredentials('a scope') ); @@ -159,7 +159,7 @@ public function testGceCredentials() public function testImpersonatedServiceAccountCredentials() { - setHomeEnv(__DIR__ . '/fixtures5'); + setHomeEnv(__DIR__ . '/fixtures/fixtures5'); $creds = ApplicationDefaultCredentials::getCredentials( null, null, @@ -181,7 +181,7 @@ public function testImpersonatedServiceAccountCredentials() public function testUserRefreshCredentials() { - setHomeEnv(__DIR__ . '/fixtures2'); + setHomeEnv(__DIR__ . '/fixtures/fixtures2'); $creds = ApplicationDefaultCredentials::getCredentials( null, // $scope @@ -216,7 +216,7 @@ public function testUserRefreshCredentials() public function testServiceAccountCredentials() { - setHomeEnv(__DIR__ . '/fixtures'); + setHomeEnv(__DIR__ . '/fixtures/fixtures1'); $creds = ApplicationDefaultCredentials::getCredentials( null, // $scope @@ -251,7 +251,7 @@ public function testServiceAccountCredentials() public function testDefaultScopeArray() { - setHomeEnv(__DIR__ . '/fixtures2'); + setHomeEnv(__DIR__ . '/fixtures/fixtures2'); $creds = ApplicationDefaultCredentials::getCredentials( null, // $scope @@ -273,21 +273,21 @@ public function testGetMiddlewareFailsIfEnvSpecifiesNonExistentFile() { $this->expectException(DomainException::class); - $keyFile = __DIR__ . '/fixtures' . '/does-not-exist-private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/does-not-exist-private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); ApplicationDefaultCredentials::getMiddleware('a scope'); } public function testGetMiddlewareLoadsOKIfEnvSpecifiedIsValid() { - $keyFile = __DIR__ . '/fixtures' . '/private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $this->assertNotNull(ApplicationDefaultCredentials::getMiddleware('a scope')); } public function testLGetMiddlewareoadsDefaultFileIfPresentAndEnvVarIsNotSet() { - setHomeEnv(__DIR__ . '/fixtures'); + setHomeEnv(__DIR__ . '/fixtures/fixtures1'); $this->assertNotNull(ApplicationDefaultCredentials::getMiddleware('a scope')); } @@ -309,7 +309,7 @@ public function testGetMiddlewareFailsIfNotOnGceAndNoDefaultFileFound() public function testGetMiddlewareWithCacheOptions() { - $keyFile = __DIR__ . '/fixtures' . '/private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $httpHandler = getHandler([ @@ -452,14 +452,14 @@ public function testGetIdTokenCredentialsFailsIfEnvSpecifiesNonExistentFile() { $this->expectException(DomainException::class); - $keyFile = __DIR__ . '/fixtures' . '/does-not-exist-private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/does-not-exist-private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); ApplicationDefaultCredentials::getIdTokenCredentials($this->targetAudience); } public function testGetIdTokenCredentialsLoadsOKIfEnvSpecifiedIsValid() { - $keyFile = __DIR__ . '/fixtures' . '/private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $creds = ApplicationDefaultCredentials::getIdTokenCredentials($this->targetAudience); @@ -468,7 +468,7 @@ public function testGetIdTokenCredentialsLoadsOKIfEnvSpecifiedIsValid() public function testGetIdTokenCredentialsLoadsDefaultFileIfPresentAndEnvVarIsNotSet() { - setHomeEnv(__DIR__ . '/fixtures'); + setHomeEnv(__DIR__ . '/fixtures/fixtures1'); $creds = ApplicationDefaultCredentials::getIdTokenCredentials($this->targetAudience); $this->assertInstanceOf(ServiceAccountCredentials::class, $creds); } @@ -495,14 +495,14 @@ public function testGetIdTokenCredentialsFailsIfNotOnGceAndNoDefaultFileFound() public function testGetIdTokenCredentialsWithImpersonatedServiceAccountCredentials() { - setHomeEnv(__DIR__ . '/fixtures5'); + setHomeEnv(__DIR__ . '/fixtures/fixtures5'); $creds = ApplicationDefaultCredentials::getIdTokenCredentials('123@456.com'); $this->assertInstanceOf(ImpersonatedServiceAccountCredentials::class, $creds); } public function testGetIdTokenCredentialsWithCacheOptions() { - $keyFile = __DIR__ . '/fixtures' . '/private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $httpHandler = getHandler([ @@ -548,7 +548,7 @@ public function testGetIdTokenCredentialsSuccedsIfNoDefaultFilesButIsOnGCE() public function testGetIdTokenCredentialsWithUserRefreshCredentials() { - setHomeEnv(__DIR__ . '/fixtures2'); + setHomeEnv(__DIR__ . '/fixtures/fixtures2'); $creds = ApplicationDefaultCredentials::getIdTokenCredentials( $this->targetAudience, @@ -567,7 +567,7 @@ public function testGetIdTokenCredentialsWithUserRefreshCredentials() public function testWithServiceAccountCredentialsAndExplicitQuotaProject() { - $keyFile = __DIR__ . '/fixtures' . '/private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $credentials = ApplicationDefaultCredentials::getCredentials( @@ -588,7 +588,7 @@ public function testWithServiceAccountCredentialsAndExplicitQuotaProject() public function testGetCredentialsUtilizesQuotaProjectInKeyFile() { - $keyFile = __DIR__ . '/fixtures' . '/private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $credentials = ApplicationDefaultCredentials::getCredentials(); @@ -604,7 +604,7 @@ public function testGetCredentialsUtilizesQuotaProjectEnvVar() { $quotaProject = 'quota-project-from-env-var'; putenv(CredentialsLoader::QUOTA_PROJECT_ENV_VAR . '=' . $quotaProject); - setHomeEnv(__DIR__ . '/fixtures'); + setHomeEnv(__DIR__ . '/fixtures/fixtures1'); $credentials = ApplicationDefaultCredentials::getCredentials(); @@ -619,7 +619,7 @@ public function testGetCredentialsUtilizesQuotaProjectParameterOverEnvVar() { $quotaProject = 'quota-project-from-parameter'; putenv(CredentialsLoader::QUOTA_PROJECT_ENV_VAR . '=quota-project-from-env-var'); - setHomeEnv(__DIR__ . '/fixtures'); + setHomeEnv(__DIR__ . '/fixtures/fixtures1'); $credentials = ApplicationDefaultCredentials::getCredentials( null, // $scope @@ -640,7 +640,7 @@ public function testGetCredentialsUtilizesQuotaProjectParameterOverEnvVar() public function testGetCredentialsUtilizesQuotaProjectEnvVarOverKeyFile() { $quotaProject = 'quota-project-from-env-var'; - $keyFile = __DIR__ . '/fixtures' . '/private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/private.json'; putenv(CredentialsLoader::QUOTA_PROJECT_ENV_VAR . '=' . $quotaProject); putenv(CredentialsLoader::ENV_VAR . '=' . $keyFile); @@ -654,7 +654,7 @@ public function testGetCredentialsUtilizesQuotaProjectEnvVarOverKeyFile() public function testWithFetchAuthTokenCacheAndExplicitQuotaProject() { - $keyFile = __DIR__ . '/fixtures' . '/private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $httpHandler = getHandler([ @@ -756,7 +756,7 @@ public function testAppEngineFlexibleIdToken() */ public function testExternalAccountCredentials(string $jsonFile, string $expectedCredSource) { - putenv(sprintf('GOOGLE_APPLICATION_CREDENTIALS=%s/fixtures6/%s', __DIR__, $jsonFile)); + putenv(sprintf('GOOGLE_APPLICATION_CREDENTIALS=%s/fixtures/fixtures6/%s', __DIR__, $jsonFile)); $creds = ApplicationDefaultCredentials::getCredentials('a_scope'); @@ -827,19 +827,19 @@ public function provideExternalAccountCredentials() public function testUniverseDomainInKeyFile() { // Test no universe domain in keyfile defaults to "googleapis.com" - $keyFile = __DIR__ . '/fixtures3/service_account_credentials.json'; + $keyFile = __DIR__ . '/fixtures/fixtures3/service_account_credentials.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $creds = ApplicationDefaultCredentials::getCredentials(); $this->assertEquals(CredentialsLoader::DEFAULT_UNIVERSE_DOMAIN, $creds->getUniverseDomain()); // Test universe domain in "service_account" keyfile - $keyFile = __DIR__ . '/fixtures/private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures1/private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $creds = ApplicationDefaultCredentials::getCredentials(); $this->assertEquals('example-universe.com', $creds->getUniverseDomain()); // Test universe domain in "authenticated_user" keyfile is not read. - $keyFile = __DIR__ . '/fixtures2/private.json'; + $keyFile = __DIR__ . '/fixtures/fixtures2/private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $creds2 = ApplicationDefaultCredentials::getCredentials(); $this->assertEquals(CredentialsLoader::DEFAULT_UNIVERSE_DOMAIN, $creds2->getUniverseDomain()); diff --git a/tests/Credentials/ServiceAccountCredentialsTest.php b/tests/Credentials/ServiceAccountCredentialsTest.php index 989179b2f1..ce323fc72e 100644 --- a/tests/Credentials/ServiceAccountCredentialsTest.php +++ b/tests/Credentials/ServiceAccountCredentialsTest.php @@ -41,7 +41,7 @@ private function createTestJson() 'client_id' => 'client123', 'type' => 'service_account', 'project_id' => 'example_project', - 'private_key' => file_get_contents(__DIR__ . '/../fixtures/private.pem'), + 'private_key' => file_get_contents(__DIR__ . '/../fixtures/fixtures1/private.pem'), ]; } @@ -138,13 +138,13 @@ public function testFailsToInitalizeFromANonExistentFile() { $this->expectException(InvalidArgumentException::class); - $keyFile = __DIR__ . '/../fixtures' . '/does-not-exist-private.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures1/does-not-exist-private.json'; new ServiceAccountCredentials('scope/1', $keyFile); } public function testInitalizeFromAFile() { - $keyFile = __DIR__ . '/../fixtures' . '/private.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures1/private.json'; $this->assertNotNull( new ServiceAccountCredentials('scope/1', $keyFile) ); @@ -176,7 +176,7 @@ public function testIsNullIfEnvVarIsNotSet() public function testFailsIfEnvSpecifiesNonExistentFile() { $this->expectException(DomainException::class); - $keyFile = __DIR__ . '/../fixtures' . '/does-not-exist-private.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures1/does-not-exist-private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); ApplicationDefaultCredentials::getCredentials('a scope'); } @@ -184,7 +184,7 @@ public function testFailsIfEnvSpecifiesNonExistentFile() /** @runInSeparateProcess */ public function testSucceedIfFileExists() { - $keyFile = __DIR__ . '/../fixtures' . '/private.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures1/private.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $this->assertNotNull(ApplicationDefaultCredentials::getCredentials('a scope')); } @@ -201,7 +201,7 @@ public function testIsNullIfFileDoesNotExist() /** @runInSeparateProcess */ public function testSucceedIfFileIsPresent() { - setHomeEnv(__DIR__ . '/../fixtures'); + setHomeEnv(__DIR__ . '/../fixtures/fixtures1'); $this->assertNotNull( ApplicationDefaultCredentials::getCredentials('a scope') ); @@ -420,7 +420,7 @@ public function testGetProjectId() public function testGetQuotaProject() { - $keyFile = __DIR__ . '/../fixtures' . '/private.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures1/private.json'; $sa = new ServiceAccountCredentials('scope/1', $keyFile); $this->assertEquals('test_quota_project', $sa->getQuotaProject()); } diff --git a/tests/Credentials/ServiceAccountJwtAccessCredentialsTest.php b/tests/Credentials/ServiceAccountJwtAccessCredentialsTest.php index 47e2796ce5..92cb2d1e67 100644 --- a/tests/Credentials/ServiceAccountJwtAccessCredentialsTest.php +++ b/tests/Credentials/ServiceAccountJwtAccessCredentialsTest.php @@ -40,7 +40,7 @@ private function createTestJson() 'client_id' => 'client123', 'type' => 'service_account', 'project_id' => 'example_project', - 'private_key' => file_get_contents(__DIR__ . '/../fixtures' . '/private.pem'), + 'private_key' => file_get_contents(__DIR__ . '/../fixtures/fixtures1/private.pem'), ]; } @@ -48,13 +48,13 @@ public function testFailsToInitalizeFromANonExistentFile() { $this->expectException(InvalidArgumentException::class); - $keyFile = __DIR__ . '/../fixtures' . '/does-not-exist-private.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures1/does-not-exist-private.json'; new ServiceAccountJwtAccessCredentials($keyFile); } public function testInitalizeFromAFile() { - $keyFile = __DIR__ . '/../fixtures' . '/private.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures1/private.json'; $this->assertNotNull( new ServiceAccountJwtAccessCredentials($keyFile) ); @@ -392,7 +392,7 @@ public function testFetchAuthTokenWithScopeAndUseJwtAccessWithScopeParameterAndA /** @runInSeparateProcess */ public function testAccessFromApplicationDefault() { - $keyFile = __DIR__ . '/../fixtures3/service_account_credentials.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures3/service_account_credentials.json'; putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile); $creds = ApplicationDefaultCredentials::getCredentials( null, // $scope @@ -408,7 +408,7 @@ public function testAccessFromApplicationDefault() $this->assertArrayHasKey('authorization', $metadata); $token = str_replace('Bearer ', '', $metadata['authorization'][0]); - $key = file_get_contents(__DIR__ . '/../fixtures3/key.pub'); + $key = file_get_contents(__DIR__ . '/../fixtures/fixtures3/key.pub'); $result = JWT::decode($token, new Key($key, 'RS256')); $this->assertEquals($authUri, $result->aud); @@ -509,7 +509,7 @@ public function testGetProjectId() public function testGetQuotaProject() { - $keyFile = __DIR__ . '/../fixtures' . '/private.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures1/private.json'; $sa = new ServiceAccountJwtAccessCredentials($keyFile); $this->assertEquals('test_quota_project', $sa->getQuotaProject()); } diff --git a/tests/Credentials/UserRefreshCredentialsTest.php b/tests/Credentials/UserRefreshCredentialsTest.php index 0432182492..3a360ee0ed 100644 --- a/tests/Credentials/UserRefreshCredentialsTest.php +++ b/tests/Credentials/UserRefreshCredentialsTest.php @@ -126,7 +126,7 @@ public function testFailsToInitalizeFromANonExistentFile() public function testInitalizeFromAFile() { - $keyFile = __DIR__ . '/../fixtures2' . '/private.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures2' . '/private.json'; $this->assertNotNull( new UserRefreshCredentials('scope/1', $keyFile) ); @@ -151,7 +151,7 @@ public function testFailsToInitializeFromInvalidJsonData() public function testValid3LOauthCreds() { - $keyFile = __DIR__ . '/../fixtures2/valid_oauth_creds.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures2/valid_oauth_creds.json'; $this->assertNotNull( new UserRefreshCredentials('scope/1', $keyFile) ); @@ -172,7 +172,7 @@ public function testFailsIfEnvSpecifiesNonExistentFile() public function testSucceedIfFileExists() { - $keyFile = __DIR__ . '/../fixtures2/private.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures2/private.json'; putenv(UserRefreshCredentials::ENV_VAR . '=' . $keyFile); $this->assertNotNull(ApplicationDefaultCredentials::getCredentials('a scope')); } @@ -187,7 +187,7 @@ public function testIsNullIfFileDoesNotExist() public function testSucceedIfFileIsPresent() { - setHomeEnv(__DIR__ . '/../fixtures2'); + setHomeEnv(__DIR__ . '/../fixtures/fixtures2'); $this->assertNotNull( ApplicationDefaultCredentials::getCredentials('a scope') ); @@ -282,7 +282,7 @@ public function testSettingBothScopeAndTargetAudienceThrowsException() public function testGetQuotaProject() { - $keyFile = __DIR__ . '/../fixtures2' . '/private.json'; + $keyFile = __DIR__ . '/../fixtures/fixtures2' . '/private.json'; $sa = new UserRefreshCredentials('a-scope', $keyFile); $this->assertEquals('test_quota_project', $sa->getQuotaProject()); } diff --git a/tests/CredentialsLoaderTest.php b/tests/CredentialsLoaderTest.php index d0336766c5..e9e24aff60 100644 --- a/tests/CredentialsLoaderTest.php +++ b/tests/CredentialsLoaderTest.php @@ -35,7 +35,7 @@ public function testUpdateMetadataSkipsWhenAuthenticationisSet() /** @runInSeparateProcess */ public function testGetDefaultClientCertSource() { - setHomeEnv(__DIR__ . '/fixtures4/valid'); + setHomeEnv(__DIR__ . '/fixtures/fixtures4/valid'); $callback = CredentialsLoader::getDefaultClientCertSource(); $this->assertNotNull($callback); @@ -61,7 +61,7 @@ public function testDefaultClientCertSourceInvalidJsonThrowsException() $this->expectException(UnexpectedValueException::class); $this->expectExceptionMessage('Invalid client cert source JSON'); - setHomeEnv(__DIR__ . '/fixtures4/invalidjson'); + setHomeEnv(__DIR__ . '/fixtures/fixtures4/invalidjson'); CredentialsLoader::getDefaultClientCertSource(); } @@ -74,7 +74,7 @@ public function testDefaultClientCertSourceInvalidKeyThrowsException() $this->expectException(UnexpectedValueException::class); $this->expectExceptionMessage('cert source requires "cert_provider_command"'); - setHomeEnv(__DIR__ . '/fixtures4/invalidkey'); + setHomeEnv(__DIR__ . '/fixtures/fixtures4/invalidkey'); CredentialsLoader::getDefaultClientCertSource(); } @@ -87,7 +87,7 @@ public function testDefaultClientCertSourceInvalidValueThrowsException() $this->expectException(UnexpectedValueException::class); $this->expectExceptionMessage('cert source expects "cert_provider_command" to be an array'); - setHomeEnv(__DIR__ . '/fixtures4/invalidvalue'); + setHomeEnv(__DIR__ . '/fixtures/fixtures4/invalidvalue'); CredentialsLoader::getDefaultClientCertSource(); } @@ -115,7 +115,7 @@ public function testDefaultClientCertSourceInvalidCmdThrowsException() $this->expectException(RuntimeException::class); $this->expectExceptionMessage('"cert_provider_command" failed with a nonzero exit code'); - setHomeEnv(__DIR__ . '/fixtures4/invalidcmd'); + setHomeEnv(__DIR__ . '/fixtures/fixtures4/invalidcmd'); $callback = CredentialsLoader::getDefaultClientCertSource(); @@ -160,7 +160,7 @@ public function testShouldLoadClientCertSourceIsTrue() */ public function testLoadJsonFromGetEnv(): void { - putenv(CredentialsLoader::ENV_VAR . '=' . __DIR__ . '/fixtures7/getenv.json'); + putenv(CredentialsLoader::ENV_VAR . '=' . __DIR__ . '/fixtures/fixtures7/getenv.json'); $json = CredentialsLoader::fromEnv(); @@ -173,7 +173,7 @@ public function testLoadJsonFromGetEnv(): void */ public function testLoadJsonFromEnv(): void { - $_ENV[CredentialsLoader::ENV_VAR] = __DIR__ . '/fixtures7/env.json'; + $_ENV[CredentialsLoader::ENV_VAR] = __DIR__ . '/fixtures/fixtures7/env.json'; $json = CredentialsLoader::fromEnv(); @@ -186,8 +186,8 @@ public function testLoadJsonFromEnv(): void */ public function testLoadJsonFromGetEnvBackwardsCompatibility(): void { - $_ENV[CredentialsLoader::ENV_VAR] = __DIR__ . '/fixtures7/env.json'; - putenv(CredentialsLoader::ENV_VAR . '=' . __DIR__ . '/fixtures7/getenv.json'); + $_ENV[CredentialsLoader::ENV_VAR] = __DIR__ . '/fixtures/fixtures7/env.json'; + putenv(CredentialsLoader::ENV_VAR . '=' . __DIR__ . '/fixtures/fixtures7/getenv.json'); $json = CredentialsLoader::fromEnv(); diff --git a/tests/FetchAuthTokenCacheTest.php b/tests/FetchAuthTokenCacheTest.php index d430dc2078..15ce22a5e8 100644 --- a/tests/FetchAuthTokenCacheTest.php +++ b/tests/FetchAuthTokenCacheTest.php @@ -195,7 +195,7 @@ public function testUpdateMetadataWithoutCache() public function testUpdateMetadataWithJwtAccess() { - $privateKey = file_get_contents(__DIR__ . '/fixtures/private.pem'); + $privateKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/private.pem'); $testJson = [ 'private_key' => $privateKey, 'private_key_id' => 'key123', diff --git a/tests/FetchAuthTokenTest.php b/tests/FetchAuthTokenTest.php index ee8c6a6b91..472e8393b7 100644 --- a/tests/FetchAuthTokenTest.php +++ b/tests/FetchAuthTokenTest.php @@ -152,7 +152,7 @@ public function testGCECredentialsGetLastReceivedToken() public function testServiceAccountCredentialsGetLastReceivedToken() { $jsonPath = sprintf( - '%s/fixtures/.config/%s', + '%s/fixtures/fixtures1/.config/%s', __DIR__, CredentialsLoader::WELL_KNOWN_PATH ); @@ -179,7 +179,7 @@ public function testServiceAccountCredentialsGetLastReceivedToken() public function testServiceAccountJwtAccessCredentialsGetLastReceivedToken() { $jsonPath = sprintf( - '%s/fixtures/.config/%s', + '%s/fixtures/fixtures1/.config/%s', __DIR__, CredentialsLoader::WELL_KNOWN_PATH ); @@ -198,7 +198,7 @@ public function testServiceAccountJwtAccessCredentialsGetLastReceivedToken() public function testUserRefreshCredentialsGetLastReceivedToken() { $jsonPath = sprintf( - '%s/fixtures2/.config/%s', + '%s/fixtures/fixtures2/.config/%s', __DIR__, CredentialsLoader::WELL_KNOWN_PATH ); diff --git a/tests/OAuth2Test.php b/tests/OAuth2Test.php index d704ebeb73..7f28c129f7 100644 --- a/tests/OAuth2Test.php +++ b/tests/OAuth2Test.php @@ -75,7 +75,9 @@ class OAuth2Test extends TestCase public function setUp(): void { $this->signingMinimal['signingKey'] = str_repeat('x', 256); - $this->fetchAuthTokenMinimal['signingKey'] = file_get_contents(__DIR__ . '/fixtures/private.pem'); + $this->fetchAuthTokenMinimal['signingKey'] = file_get_contents( + __DIR__ . '/fixtures/fixtures1/private.pem' + ); } /** @@ -663,8 +665,8 @@ public function testCanHS256EncodeAValidPayload() */ public function testCanRS256EncodeAValidPayload() { - $publicKey = file_get_contents(__DIR__ . '/fixtures' . '/public.pem'); - $privateKey = file_get_contents(__DIR__ . '/fixtures' . '/private.pem'); + $publicKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/public.pem'); + $privateKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/private.pem'); $testConfig = $this->signingMinimal; $o = new OAuth2($testConfig); $o->setSigningAlgorithm('RS256'); @@ -681,8 +683,8 @@ public function testCanRS256EncodeAValidPayload() */ public function testCanHaveAdditionalClaims() { - $publicKey = file_get_contents(__DIR__ . '/fixtures' . '/public.pem'); - $privateKey = file_get_contents(__DIR__ . '/fixtures' . '/private.pem'); + $publicKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/public.pem'); + $privateKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/private.pem'); $testConfig = $this->signingMinimal; $targetAud = '123@456.com'; $testConfig['additionalClaims'] = ['target_audience' => $targetAud]; @@ -1117,7 +1119,7 @@ public function testFailsIfIdTokenIsInvalid() { $this->expectException(UnexpectedValueException::class); - $publicKey = file_get_contents(__DIR__ . '/fixtures' . '/public.pem'); + $publicKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/public.pem'); $testConfig = $this->verifyIdTokenMinimal; $not_a_jwt = 'not a jot'; $o = new OAuth2($testConfig); @@ -1132,8 +1134,8 @@ public function testFailsIfAudienceIsMissing() { $this->expectException(DomainException::class); - $publicKey = file_get_contents(__DIR__ . '/fixtures' . '/public.pem'); - $privateKey = file_get_contents(__DIR__ . '/fixtures' . '/private.pem'); + $publicKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/public.pem'); + $privateKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/private.pem'); $testConfig = $this->verifyIdTokenMinimal; $now = time(); $origIdToken = [ @@ -1154,8 +1156,8 @@ public function testFailsIfAudienceIsWrong() { $this->expectException(DomainException::class); - $publicKey = file_get_contents(__DIR__ . '/fixtures' . '/public.pem'); - $privateKey = file_get_contents(__DIR__ . '/fixtures' . '/private.pem'); + $publicKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/public.pem'); + $privateKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/private.pem'); $now = time(); $testConfig = $this->verifyIdTokenMinimal; $origIdToken = [ @@ -1178,7 +1180,7 @@ public function testFailsWithStringPublicKeyAndAllowedAlgsGreaterThanOne() $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('To have multiple allowed algorithms'); - $publicKey = file_get_contents(__DIR__ . '/fixtures' . '/public.pem'); + $publicKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/public.pem'); $testConfig = $this->verifyIdTokenMinimal; $not_a_jwt = 'not a jot'; $o = new OAuth2($testConfig); @@ -1194,7 +1196,7 @@ public function testFailsWithStringPublicKeyAndNoAllowedAlgs() $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('When allowed algorithms is empty'); - $publicKey = file_get_contents(__DIR__ . '/fixtures' . '/public.pem'); + $publicKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/public.pem'); $testConfig = $this->verifyIdTokenMinimal; $not_a_jwt = 'not a jot'; $o = new OAuth2($testConfig); @@ -1210,7 +1212,7 @@ public function testFailsWithStringInPublicKeyArrayAndNoAllowedAlgs() $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('When allowed algorithms is empty'); - $publicKey = file_get_contents(__DIR__ . '/fixtures' . '/public.pem'); + $publicKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/public.pem'); $testConfig = $this->verifyIdTokenMinimal; $not_a_jwt = 'not a jot'; $o = new OAuth2($testConfig); @@ -1229,7 +1231,7 @@ public function testFailsWithInvalidTypeForAllowedAlgs() $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('allowed algorithms must be a string or array'); - $publicKey = file_get_contents(__DIR__ . '/fixtures' . '/public.pem'); + $publicKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/public.pem'); $testConfig = $this->verifyIdTokenMinimal; $not_a_jwt = 'not a jot'; $o = new OAuth2($testConfig); @@ -1242,8 +1244,8 @@ public function testFailsWithInvalidTypeForAllowedAlgs() */ public function testShouldReturnAValidIdToken() { - $publicKey = file_get_contents(__DIR__ . '/fixtures' . '/public.pem'); - $privateKey = file_get_contents(__DIR__ . '/fixtures' . '/private.pem'); + $publicKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/public.pem'); + $privateKey = file_get_contents(__DIR__ . '/fixtures/fixtures1/private.pem'); $testConfig = $this->verifyIdTokenMinimal; $now = time(); $origIdToken = [ diff --git a/tests/ObservabilityMetricsTest.php b/tests/ObservabilityMetricsTest.php index c71e8746fc..a9b0591022 100644 --- a/tests/ObservabilityMetricsTest.php +++ b/tests/ObservabilityMetricsTest.php @@ -86,7 +86,7 @@ function ($request, $options) use ( */ public function testServiceAccountCredentials($scope, $targetAudience, $requestTypeHeaderValue) { - $keyFile = __DIR__ . '/fixtures3/service_account_credentials.json'; + $keyFile = __DIR__ . '/fixtures/fixtures3/service_account_credentials.json'; $handlerCalled = false; $handler = $this->getCustomHandler('sa', $requestTypeHeaderValue, $handlerCalled); @@ -105,7 +105,7 @@ public function testServiceAccountCredentials($scope, $targetAudience, $requestT */ public function testServiceAccountJwtAccessCredentials() { - $keyFile = __DIR__ . '/fixtures3/service_account_credentials.json'; + $keyFile = __DIR__ . '/fixtures/fixtures3/service_account_credentials.json'; $saJwt = new ServiceAccountJwtAccessCredentials($keyFile, 'exampleScope'); $metadata = $saJwt->updateMetadata([self::$headerKey => ['foo']], null, null); $this->assertArrayHasKey(self::$headerKey, $metadata); @@ -119,7 +119,7 @@ public function testServiceAccountJwtAccessCredentials() public function testImpersonatedServiceAccountCredentials() { - $keyFile = __DIR__ . '/fixtures5/.config/gcloud/application_default_credentials.json'; + $keyFile = __DIR__ . '/fixtures/fixtures5/.config/gcloud/application_default_credentials.json'; $handlerCalled = false; $responseFromIam = json_encode(['accessToken' => '1/abdef1234567890', 'expireTime' => '2024-01-01T00:00:00Z']); $handler = getHandler([ @@ -133,7 +133,7 @@ public function testImpersonatedServiceAccountCredentials() public function testImpersonatedServiceAccountCredentialsWithIdTokens() { - $keyFile = __DIR__ . '/fixtures5/.config/gcloud/application_default_credentials.json'; + $keyFile = __DIR__ . '/fixtures/fixtures5/.config/gcloud/application_default_credentials.json'; $handlerCalled = false; $responseFromIam = json_encode(['token' => '1/abdef1234567890']); $handler = getHandler([ @@ -151,7 +151,7 @@ public function testImpersonatedServiceAccountCredentialsWithIdTokens() */ public function testUserRefreshCredentials() { - $keyFile = __DIR__ . '/fixtures2/gcloud.json'; + $keyFile = __DIR__ . '/fixtures/fixtures2/gcloud.json'; $handlerCalled = false; $handler = $this->getCustomHandler('u', 'auth-request-type/at', $handlerCalled); @@ -161,7 +161,7 @@ public function testUserRefreshCredentials() public function testUserRefreshCredentialsWithIdTokens() { - $keyFile = __DIR__ . '/fixtures2/gcloud.json'; + $keyFile = __DIR__ . '/fixtures/fixtures2/gcloud.json'; $handlerCalled = false; $handler = $this->getCustomHandler('u', 'auth-request-type/it', $handlerCalled); diff --git a/tests/ServiceAccountSignerTraitTest.php b/tests/ServiceAccountSignerTraitTest.php index 51c15e93df..7cf6be49d5 100644 --- a/tests/ServiceAccountSignerTraitTest.php +++ b/tests/ServiceAccountSignerTraitTest.php @@ -38,7 +38,7 @@ class ServiceAccountSignerTraitTest extends TestCase public function testSignBlob($useOpenSsl) { $trait = new ServiceAccountSignerTraitImpl( - file_get_contents(__DIR__ . '/fixtures/private.pem') + file_get_contents(__DIR__ . '/fixtures/fixtures1/private.pem') ); $res = $trait->signBlob(self::STRING_TO_SIGN, $useOpenSsl); diff --git a/tests/fixtures/.config/gcloud b/tests/fixtures/fixtures1/.config/gcloud similarity index 100% rename from tests/fixtures/.config/gcloud rename to tests/fixtures/fixtures1/.config/gcloud diff --git a/tests/fixtures/federated-certs.json b/tests/fixtures/fixtures1/federated-certs.json similarity index 100% rename from tests/fixtures/federated-certs.json rename to tests/fixtures/fixtures1/federated-certs.json diff --git a/tests/fixtures/gcloud/application_default_credentials.json b/tests/fixtures/fixtures1/gcloud/application_default_credentials.json similarity index 100% rename from tests/fixtures/gcloud/application_default_credentials.json rename to tests/fixtures/fixtures1/gcloud/application_default_credentials.json diff --git a/tests/fixtures/private.json b/tests/fixtures/fixtures1/private.json similarity index 100% rename from tests/fixtures/private.json rename to tests/fixtures/fixtures1/private.json diff --git a/tests/fixtures/private.pem b/tests/fixtures/fixtures1/private.pem similarity index 100% rename from tests/fixtures/private.pem rename to tests/fixtures/fixtures1/private.pem diff --git a/tests/fixtures/public.pem b/tests/fixtures/fixtures1/public.pem similarity index 100% rename from tests/fixtures/public.pem rename to tests/fixtures/fixtures1/public.pem diff --git a/tests/fixtures2/.config/gcloud b/tests/fixtures/fixtures2/.config/gcloud similarity index 100% rename from tests/fixtures2/.config/gcloud rename to tests/fixtures/fixtures2/.config/gcloud diff --git a/tests/fixtures2/gcloud.json b/tests/fixtures/fixtures2/gcloud.json similarity index 100% rename from tests/fixtures2/gcloud.json rename to tests/fixtures/fixtures2/gcloud.json diff --git a/tests/fixtures2/gcloud/application_default_credentials.json b/tests/fixtures/fixtures2/gcloud/application_default_credentials.json similarity index 100% rename from tests/fixtures2/gcloud/application_default_credentials.json rename to tests/fixtures/fixtures2/gcloud/application_default_credentials.json diff --git a/tests/fixtures2/private.json b/tests/fixtures/fixtures2/private.json similarity index 100% rename from tests/fixtures2/private.json rename to tests/fixtures/fixtures2/private.json diff --git a/tests/fixtures2/valid_oauth_creds.json b/tests/fixtures/fixtures2/valid_oauth_creds.json similarity index 100% rename from tests/fixtures2/valid_oauth_creds.json rename to tests/fixtures/fixtures2/valid_oauth_creds.json diff --git a/tests/fixtures3/key.pub b/tests/fixtures/fixtures3/key.pub similarity index 100% rename from tests/fixtures3/key.pub rename to tests/fixtures/fixtures3/key.pub diff --git a/tests/fixtures3/service_account_credentials.json b/tests/fixtures/fixtures3/service_account_credentials.json similarity index 100% rename from tests/fixtures3/service_account_credentials.json rename to tests/fixtures/fixtures3/service_account_credentials.json diff --git a/tests/fixtures4/invalidcmd/.secureConnect/context_aware_metadata.json b/tests/fixtures/fixtures4/invalidcmd/.secureConnect/context_aware_metadata.json similarity index 100% rename from tests/fixtures4/invalidcmd/.secureConnect/context_aware_metadata.json rename to tests/fixtures/fixtures4/invalidcmd/.secureConnect/context_aware_metadata.json diff --git a/tests/fixtures4/invalidjson/.secureConnect/context_aware_metadata.json b/tests/fixtures/fixtures4/invalidjson/.secureConnect/context_aware_metadata.json similarity index 100% rename from tests/fixtures4/invalidjson/.secureConnect/context_aware_metadata.json rename to tests/fixtures/fixtures4/invalidjson/.secureConnect/context_aware_metadata.json diff --git a/tests/fixtures4/invalidkey/.secureConnect/context_aware_metadata.json b/tests/fixtures/fixtures4/invalidkey/.secureConnect/context_aware_metadata.json similarity index 100% rename from tests/fixtures4/invalidkey/.secureConnect/context_aware_metadata.json rename to tests/fixtures/fixtures4/invalidkey/.secureConnect/context_aware_metadata.json diff --git a/tests/fixtures4/invalidvalue/.secureConnect/context_aware_metadata.json b/tests/fixtures/fixtures4/invalidvalue/.secureConnect/context_aware_metadata.json similarity index 100% rename from tests/fixtures4/invalidvalue/.secureConnect/context_aware_metadata.json rename to tests/fixtures/fixtures4/invalidvalue/.secureConnect/context_aware_metadata.json diff --git a/tests/fixtures4/valid/.secureConnect/context_aware_metadata.json b/tests/fixtures/fixtures4/valid/.secureConnect/context_aware_metadata.json similarity index 100% rename from tests/fixtures4/valid/.secureConnect/context_aware_metadata.json rename to tests/fixtures/fixtures4/valid/.secureConnect/context_aware_metadata.json diff --git a/tests/fixtures5/.config/gcloud b/tests/fixtures/fixtures5/.config/gcloud similarity index 100% rename from tests/fixtures5/.config/gcloud rename to tests/fixtures/fixtures5/.config/gcloud diff --git a/tests/fixtures5/gcloud/application_default_credentials.json b/tests/fixtures/fixtures5/gcloud/application_default_credentials.json similarity index 100% rename from tests/fixtures5/gcloud/application_default_credentials.json rename to tests/fixtures/fixtures5/gcloud/application_default_credentials.json diff --git a/tests/fixtures6/aws_credentials.json b/tests/fixtures/fixtures6/aws_credentials.json similarity index 100% rename from tests/fixtures6/aws_credentials.json rename to tests/fixtures/fixtures6/aws_credentials.json diff --git a/tests/fixtures6/executable_credentials.json b/tests/fixtures/fixtures6/executable_credentials.json similarity index 100% rename from tests/fixtures6/executable_credentials.json rename to tests/fixtures/fixtures6/executable_credentials.json diff --git a/tests/fixtures6/file_credentials.json b/tests/fixtures/fixtures6/file_credentials.json similarity index 100% rename from tests/fixtures6/file_credentials.json rename to tests/fixtures/fixtures6/file_credentials.json diff --git a/tests/fixtures6/url_credentials.json b/tests/fixtures/fixtures6/url_credentials.json similarity index 100% rename from tests/fixtures6/url_credentials.json rename to tests/fixtures/fixtures6/url_credentials.json diff --git a/tests/fixtures7/env.json b/tests/fixtures/fixtures7/env.json similarity index 100% rename from tests/fixtures7/env.json rename to tests/fixtures/fixtures7/env.json diff --git a/tests/fixtures7/getenv.json b/tests/fixtures/fixtures7/getenv.json similarity index 100% rename from tests/fixtures7/getenv.json rename to tests/fixtures/fixtures7/getenv.json From bb1215baabd0e4730beff440805bf4f72e9717ee Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 12 Feb 2026 03:44:35 -0800 Subject: [PATCH 2/2] fix cs --- tests/Credentials/GCECredentialsTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Credentials/GCECredentialsTest.php b/tests/Credentials/GCECredentialsTest.php index ab7353ce30..e3bc425642 100644 --- a/tests/Credentials/GCECredentialsTest.php +++ b/tests/Credentials/GCECredentialsTest.php @@ -138,7 +138,6 @@ public function testOnWindowsGceWithResidencyWithNoCom() $method = (new ReflectionClass(GCECredentials::class)) ->getMethod('detectResidencyWindows'); - $this->assertFalse($method->invoke(null, 'thisShouldBeFalse')); }