Skip to content

Commit c7a0ad5

Browse files
authored
Add integration test via localstack (#941)
1 parent d29d8b4 commit c7a0ad5

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

tests/Functional/BundleInitializationTest.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ public function testInitBundle()
3131
$kernel->addConfigFile(__DIR__ . '/Resources/config/default.yaml');
3232
$this->bootKernel();
3333

34-
$this->assertServiceExists('async_aws.client.s3', S3Client::class);
35-
$this->assertServiceExists('async_aws.client.sqs', SqsClient::class);
36-
$this->assertServiceExists('async_aws.client.ses', SesClient::class);
37-
$this->assertServiceExists('async_aws.client.foobar', SqsClient::class);
38-
$this->assertServiceExists('async_aws.client.secret', SsmClient::class);
34+
self::assertServiceExists('async_aws.client.s3', S3Client::class);
35+
self::assertServiceExists('async_aws.client.sqs', SqsClient::class);
36+
self::assertServiceExists('async_aws.client.ses', SesClient::class);
37+
self::assertServiceExists('async_aws.client.foobar', SqsClient::class);
38+
self::assertServiceExists('async_aws.client.secret', SsmClient::class);
3939

4040
// Test autowired clients
41-
$this->assertServiceExists(S3Client::class, S3Client::class);
42-
$this->assertServiceExists(SqsClient::class, SqsClient::class);
43-
$this->assertServiceExists(SesClient::class, SesClient::class);
41+
self::assertServiceExists(S3Client::class, S3Client::class);
42+
self::assertServiceExists(SqsClient::class, SqsClient::class);
43+
self::assertServiceExists(SesClient::class, SesClient::class);
4444

4545
// Test autowire by name
46-
$this->assertServiceExists(SqsClient::class . ' $foobar', SqsClient::class);
46+
self::assertServiceExists(SqsClient::class . ' $foobar', SqsClient::class);
4747

4848
// Test secret
49-
$this->assertServiceExists(SsmVault::class, SsmVault::class);
49+
self::assertServiceExists(SsmVault::class, SsmVault::class);
5050

5151
$container = $this->getContainer();
5252
self::assertFalse($container->has(SqsClient::class . ' $notFound'));
@@ -59,14 +59,14 @@ public function testEmptyConfig()
5959
$kernel->addConfigFile(__DIR__ . '/Resources/config/empty.yaml');
6060
$this->bootKernel();
6161

62-
$this->assertServiceExists('async_aws.client.s3', S3Client::class);
63-
$this->assertServiceExists('async_aws.client.sqs', SqsClient::class);
64-
$this->assertServiceExists('async_aws.client.ses', SesClient::class);
62+
self::assertServiceExists('async_aws.client.s3', S3Client::class);
63+
self::assertServiceExists('async_aws.client.sqs', SqsClient::class);
64+
self::assertServiceExists('async_aws.client.ses', SesClient::class);
6565

6666
// Test autowired clients
67-
$this->assertServiceExists(S3Client::class, S3Client::class);
68-
$this->assertServiceExists(SqsClient::class, SqsClient::class);
69-
$this->assertServiceExists(SesClient::class, SesClient::class);
67+
self::assertServiceExists(S3Client::class, S3Client::class);
68+
self::assertServiceExists(SqsClient::class, SqsClient::class);
69+
self::assertServiceExists(SesClient::class, SesClient::class);
7070
}
7171

7272
public function testNotRegisterServices()

tests/Unit/DependencyInjection/ConfigurationTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ class ConfigurationTest extends TestCase
1414

1515
public function testNoConfigIsValid(): void
1616
{
17-
$this->assertConfigurationIsValid([
17+
self::assertConfigurationIsValid([
1818
[], // no values at all
1919
]);
2020
}
2121

2222
public function testDefaultValues(): void
2323
{
24-
$this->assertProcessedConfigurationEquals([
24+
self::assertProcessedConfigurationEquals([
2525
[],
2626
], [
2727
'register_service' => true,
@@ -45,7 +45,7 @@ public function testDefaultValues(): void
4545

4646
public function testServiceWithAwsName(): void
4747
{
48-
$this->assertProcessedConfigurationEquals([
48+
self::assertProcessedConfigurationEquals([
4949
['clients' => [
5050
'sqs' => ['config' => ['foo' => 'bar']],
5151
]],
@@ -62,7 +62,7 @@ public function testServiceWithAwsName(): void
6262

6363
public function testServiceWithCustomName(): void
6464
{
65-
$this->assertProcessedConfigurationEquals([
65+
self::assertProcessedConfigurationEquals([
6666
['clients' => [
6767
'foobar' => [
6868
'type' => 'sqs',
@@ -81,7 +81,7 @@ public function testServiceWithCustomName(): void
8181

8282
public function testServiceWithCustomNameWithoutType(): void
8383
{
84-
$this->assertConfigurationIsInvalid([
84+
self::assertConfigurationIsInvalid([
8585
['clients' => [
8686
'foobar' => [
8787
],
@@ -91,7 +91,7 @@ public function testServiceWithCustomNameWithoutType(): void
9191

9292
public function testServiceWithCustomNameWithWrongType(): void
9393
{
94-
$this->assertConfigurationIsInvalid([
94+
self::assertConfigurationIsInvalid([
9595
['clients' => [
9696
'foobar' => [
9797
'type' => 'blabla',
@@ -102,7 +102,7 @@ public function testServiceWithCustomNameWithWrongType(): void
102102

103103
public function testServiceWithAwsNameWithWrongType(): void
104104
{
105-
$this->assertConfigurationIsInvalid([
105+
self::assertConfigurationIsInvalid([
106106
['clients' => [
107107
'sqs' => [
108108
'type' => 's3',

0 commit comments

Comments
 (0)