diff --git a/tests/ClientResolverTest.php b/tests/ClientResolverTest.php index c712c146ab..86eb941b62 100644 --- a/tests/ClientResolverTest.php +++ b/tests/ClientResolverTest.php @@ -1697,168 +1697,4 @@ public function testEmitsDeprecationWarning() putenv('AWS_SUPPRESS_PHP_DEPRECATION_WARNING=true'); } } - - /** - * @dataProvider defaultRegionUseAwsSharedFileProvider - * - * @param $args - * @param $region - * @param $expected - * @return void - */ - public function testDefaultRegionHonorUseAwsSharedFiles( - $args, - $region, - $expected - ): void - { - $tempHomeDir = sys_get_temp_dir() . "/default_region_test"; - $awsDir = $tempHomeDir . "/.aws"; - if (!is_dir($awsDir)) { - mkdir($tempHomeDir, 0777, true); - mkdir($awsDir, 0777, true); - } - $configPath = $awsDir . "/config"; - $config = << [ - 'args' => [ - 'use_aws_shared_config_files' => true, - ], - 'region' => $configRegion, - 'expected' => $configRegion - ], - 'expect_region_when_flag_not_present' => [ - 'args' => [ - ], - 'region' => $configRegion, - 'expected' => $configRegion - ], - 'expect_region_to_be_empty' => [ - 'args' => [ - 'use_aws_shared_config_files' => false, - ], - 'region' => $configRegion, - 'expected' => '' // empty - ] - ]; - } - - /** - * @dataProvider defaultSigv4aSigningRegionSetUseAwsSharedFileProvider - * - * @param $args - * @param $sigv4aSigningRegionSet - * @param $expected - * @return void - */ - public function testDefaultSigv4aSigningRegionSetHonorUseAwsSharedFiles( - $args, - $sigv4aSigningRegionSet, - $expected - ): void - { - $tempHomeDir = sys_get_temp_dir() . "/default_sigv4a_signing_region_set_test"; - $awsDir = $tempHomeDir . "/.aws"; - if (!is_dir($awsDir)) { - mkdir($tempHomeDir, 0777, true); - mkdir($awsDir, 0777, true); - } - $configPath = $awsDir . "/config"; - $config = << [ - 'args' => [ - 'use_aws_shared_config_files' => true, - ], - 'sigv4a_signing_region_set' => $configSigv4aSigningRegionSet, - 'expected' => $configSigv4aSigningRegionSet - ], - 'expect_sigv4a_signing_region_set_when_flag_not_present' => [ - 'args' => [ - ], - 'sigv4a_signing_region_set' => $configSigv4aSigningRegionSet, - 'expected' => $configSigv4aSigningRegionSet - ], - 'eexpect_sigv4a_signing_region_set_to_be_empty' => [ - 'args' => [ - 'use_aws_shared_config_files' => false, - ], - 'sigv4a_signing_region_set' => $configSigv4aSigningRegionSet, - 'expected' => '' // empty - ] - ]; - } }