Skip to content

Commit bb9adef

Browse files
committed
tests(notifier): avoid failing SNS test with local AWS configuration
1 parent ffcf7b0 commit bb9adef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Symfony/Component/Notifier/Bridge/AmazonSns/Tests/AmazonSnsTransportFactoryTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ class AmazonSnsTransportFactoryTest extends TransportFactoryTestCase
1818
{
1919
public function createFactory(): AmazonSnsTransportFactory
2020
{
21+
// Tests will fail if a ~/.aws/config file exists with a default.region value,
22+
// or if AWS_REGION env variable is set.
23+
// Setting a profile & region names will bypass default options retrieved by \AsyncAws\Core::get
24+
$_ENV['AWS_PROFILE'] = 'not-existing';
25+
$_ENV['AWS_REGION'] = 'us-east-1';
26+
2127
return new AmazonSnsTransportFactory();
2228
}
2329

0 commit comments

Comments
 (0)