Skip to content

Commit c7b5491

Browse files
author
=
committed
Merge branch 'main' of https://github.com/akhan619/laravel-ses-tracking into main
2 parents d33f417 + 7c2d589 commit c7b5491

File tree

7 files changed

+36
-37
lines changed

7 files changed

+36
-37
lines changed

src/Console/Commands/SetupTrackingCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public function handle()
4141
}
4242

4343
/**
44-
* Get the SymfonyStyle instance
45-
*
46-
* @return SymfonyStyle
47-
*/
44+
* Get the SymfonyStyle instance.
45+
*
46+
* @return SymfonyStyle
47+
*/
4848
public function getIo()
4949
{
5050
return $this->io;

tests/Unit/AwsCredentialsManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Akhan619\LaravelSesTracking\Console\Commands\SetupTrackingCommand;
77
use Akhan619\LaravelSesTracking\LaravelSesTrackingServiceProvider;
88
use Akhan619\LaravelSesTracking\Tests\UnitTestCase;
9-
use \Mockery;
9+
use Mockery;
1010

1111
class AwsCredentialsManagerTest extends UnitTestCase
1212
{

tests/Unit/SesDataManagerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Akhan619\LaravelSesTracking\Console\Commands\SetupTrackingCommand;
77
use Akhan619\LaravelSesTracking\LaravelSesTrackingServiceProvider;
88
use Akhan619\LaravelSesTracking\Tests\UnitTestCase;
9-
use \Mockery;
9+
use Mockery;
1010

1111
class SesDataManagerTest extends UnitTestCase
1212
{
@@ -242,12 +242,12 @@ public function configurationSetDataIsSetCorrectly()
242242

243243
$this->assertEquals($configSet, [
244244
'ConfigurationSetName' => 'Test-Set',
245-
'DeliveryOptions' => [
245+
'DeliveryOptions' => [
246246
'SendingPoolName' => 'pool-1',
247-
'TlsPolicy' => 'REQUIRE',
247+
'TlsPolicy' => 'REQUIRE',
248248
],
249249
'ReputationOptions' => [
250-
'LastFreshStart' => '10 September 2000',
250+
'LastFreshStart' => '10 September 2000',
251251
'ReputationMetricsEnabled' => true,
252252
],
253253
'SendingOptions' => [
@@ -258,7 +258,7 @@ public function configurationSetDataIsSetCorrectly()
258258
],
259259
'Tags' => [
260260
[
261-
'Key' => 'Key1',
261+
'Key' => 'Key1',
262262
'Value' => 'Value1',
263263
],
264264
],

tests/Unit/SesManagerTest.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Akhan619\LaravelSesTracking\App\Contracts\AwsCredentialsContract;
66
use Akhan619\LaravelSesTracking\App\Contracts\SesDataContract;
77
use Akhan619\LaravelSesTracking\App\SesManager;
8-
use Akhan619\LaravelSesTracking\App\SnsManager;
98
use Akhan619\LaravelSesTracking\Console\Commands\SetupTrackingCommand;
109
use Akhan619\LaravelSesTracking\LaravelSesTrackingServiceProvider;
1110
use Akhan619\LaravelSesTracking\Tests\UnitTestCase;
@@ -83,7 +82,7 @@ public function sesManagerCreateConfigurationSetMethodPrintsCorrectlyInDebugMode
8382
* @test
8483
*/
8584
public function sesManagerCreateConfigurationSetMethodWorksCorrectlyInLiveMode()
86-
{
85+
{
8786
$aws = Mockery::mock(AwsCredentialsContract::class);
8887
$aws->shouldReceive([
8988
'getAwsAccessKeyId' => 'someId',
@@ -111,7 +110,7 @@ public function sesManagerCreateConfigurationSetMethodWorksCorrectlyInLiveMode()
111110
* @test
112111
*/
113112
public function sesManagerConfirmNamingConventionPrintsCorrectly()
114-
{
113+
{
115114
$aws = Mockery::mock(AwsCredentialsContract::class);
116115
$aws->shouldReceive([
117116
'getAwsAccessKeyId' => 'someId',
@@ -127,18 +126,18 @@ public function sesManagerConfirmNamingConventionPrintsCorrectly()
127126

128127
$dataMgr->shouldReceive('getEventDestinationSuffix')
129128
->andReturn('us-east-1');
130-
129+
131130
$dataMgr->shouldReceive('getTopicNameAsSuffix')
132131
->andReturn(true);
133-
132+
134133
$dataMgr->shouldReceive('getEventDestinationPrefix')
135134
->andReturn('destination');
136135

137136
$console = Mockery::mock(SetupTrackingCommand::class);
138137
$console->shouldReceive('getIo->table')
139138
->once()
140139
->with(['Event', 'Event Destination Name'], [
141-
['sends', 'destination-sns-sends']
140+
['sends', 'destination-sns-sends'],
142141
]);
143142

144143
$console->shouldReceive('info')
@@ -157,7 +156,7 @@ public function sesManagerConfirmNamingConventionPrintsCorrectly()
157156
* @test
158157
*/
159158
public function sesManagerConfirmNamingConventionThrowsExceptionOnEmptyName()
160-
{
159+
{
161160
$aws = Mockery::mock(AwsCredentialsContract::class);
162161
$aws->shouldReceive([
163162
'getAwsAccessKeyId' => 'someId',
@@ -173,10 +172,10 @@ public function sesManagerConfirmNamingConventionThrowsExceptionOnEmptyName()
173172

174173
$dataMgr->shouldReceive('getEventDestinationSuffix')
175174
->andReturn(null);
176-
175+
177176
$dataMgr->shouldReceive('getTopicNameAsSuffix')
178177
->andReturn(false);
179-
178+
180179
$dataMgr->shouldReceive('getEventDestinationPrefix')
181180
->andReturn(null);
182181

@@ -190,7 +189,7 @@ public function sesManagerConfirmNamingConventionThrowsExceptionOnEmptyName()
190189
->once();
191190

192191
$sesMgr = new SesManager($aws, $dataMgr, true, $console);
193-
192+
194193
$hasThrown = false;
195194

196195
try {

tests/Unit/SnsDataManagerTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Akhan619\LaravelSesTracking\Console\Commands\SetupTrackingCommand;
77
use Akhan619\LaravelSesTracking\LaravelSesTrackingServiceProvider;
88
use Akhan619\LaravelSesTracking\Tests\UnitTestCase;
9-
use \Mockery;
9+
use Mockery;
1010

1111
class SnsDataManagerTest extends UnitTestCase
1212
{
@@ -230,12 +230,12 @@ public function topicConfigurationDataIsSetCorrectly()
230230
$topicData = $obj->getTopicConfigurationData();
231231

232232
$this->assertEquals($topicData, [
233-
'Attributes' => [
234-
'DeliveryPolicy' => json_encode(['TWO-FACE']),
235-
'Policy' => json_encode(['ROBIN']),
236-
'KmsMasterKeyId' => "BANE",
237-
'Tags' => [['Key' => 'Key1', 'Value' => 'Value1']],
238-
]
233+
'Attributes' => [
234+
'DeliveryPolicy' => json_encode(['TWO-FACE']),
235+
'Policy' => json_encode(['ROBIN']),
236+
'KmsMasterKeyId' => 'BANE',
237+
'Tags' => [['Key' => 'Key1', 'Value' => 'Value1']],
238+
],
239239
]);
240240
}
241241

@@ -259,13 +259,13 @@ public function subscriptionConfigurationDataIsSetCorrectly()
259259
$subsData = $obj->getSubscriptionConfigurationData();
260260

261261
$this->assertEquals($subsData, [
262-
'Attributes' => [
263-
'DeliveryPolicy' => json_encode(['DRMANHATTAN']),
264-
'FilterPolicy' => json_encode(['OZZYMANDIAS']),
265-
'RawMessageDelivery' => "true",
266-
'RedrivePolicy' => "COMEDIAN",
262+
'Attributes' => [
263+
'DeliveryPolicy' => json_encode(['DRMANHATTAN']),
264+
'FilterPolicy' => json_encode(['OZZYMANDIAS']),
265+
'RawMessageDelivery' => 'true',
266+
'RedrivePolicy' => 'COMEDIAN',
267267
],
268-
'ReturnSubscriptionArn' => true
268+
'ReturnSubscriptionArn' => true,
269269
]);
270270
}
271271
}

tests/Unit/SubscriptionManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Akhan619\LaravelSesTracking\Console\Commands\SetupTrackingCommand;
77
use Akhan619\LaravelSesTracking\LaravelSesTrackingServiceProvider;
88
use Akhan619\LaravelSesTracking\Tests\UnitTestCase;
9-
use \Mockery;
9+
use Mockery;
1010

1111
class SubscriptionManagerTest extends UnitTestCase
1212
{

tests/Unit/WebhooksManagerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
namespace Akhan619\LaravelSesTracking\Tests\Unit;
44

55
use Akhan619\LaravelSesTracking\App\Implementations\SubscriptionManager;
6-
use Akhan619\LaravelSesTracking\Console\Commands\SetupTrackingCommand;
76
use Akhan619\LaravelSesTracking\App\Implementations\WebhooksManager;
7+
use Akhan619\LaravelSesTracking\Console\Commands\SetupTrackingCommand;
88
use Akhan619\LaravelSesTracking\LaravelSesTrackingServiceProvider;
99
use Akhan619\LaravelSesTracking\Tests\UnitTestCase;
10-
use \Mockery;
10+
use Mockery;
1111

1212
class WebhooksManagerTest extends UnitTestCase
1313
{
@@ -224,7 +224,7 @@ public function confirmRouteInfoPrintsTheCorrectDataToConsole()
224224
->once()
225225
->with(['Event', 'Route Name'], [
226226
['sends', 'https://example.com/notifications/send-101'],
227-
['rendering_failures', 'https://example.com/notifications/rendering-failures-101']
227+
['rendering_failures', 'https://example.com/notifications/rendering-failures-101'],
228228
]);
229229

230230
$console->shouldReceive('confirm')

0 commit comments

Comments
 (0)