Skip to content

Commit

Permalink
fix: Code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
notz committed Jun 14, 2024
1 parent cb048c7 commit b3afd81
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 35 deletions.
1 change: 0 additions & 1 deletion Config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

declare(strict_types=1);

use Mautic\CoreBundle\DependencyInjection\MauticCoreExtension;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return function (ContainerConfigurator $configurator) {
Expand Down
64 changes: 30 additions & 34 deletions Tests/Functional/EventSubscriber/CallbackSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@

class CallbackSubscriberTest extends MauticMysqlTestCase
{
/*
protected function setUp(): void
{

if ('testPostalTransportNotConfigured' !== $this->name()) {
$this->configParams['mailer_dsn'] = 'mautic+smtp://:user@host:25';
}

// parent::setUp();
parent::setUp();
}
*/

public function testPostalTransportNotConfigured(): void
{
Expand All @@ -48,7 +46,6 @@ public function testPostalCallbackProcessWithMessageFailed(): void
Assert::assertSame('Callback processed', $response->getContent());
Assert::assertSame(200, $response->getStatusCode());


$dnc = $contact->getDoNotContact()->current();
Assert::assertSame('email', $dnc->getChannel());
Assert::assertSame('Hard bounce', $dnc->getComments());
Expand All @@ -72,7 +69,6 @@ public function testPostalCallbackProcessWithMessageBounced(): void
Assert::assertSame('Callback processed', $response->getContent());
Assert::assertSame(200, $response->getStatusCode());


$dnc = $contact->getDoNotContact()->current();
Assert::assertSame('email', $dnc->getChannel());
Assert::assertSame('Delivery failed', $dnc->getComments());
Expand All @@ -88,19 +84,19 @@ private function getFailedParameters(): array
{
return [
[
'event' => 'MessageFailed',
'event' => 'MessageFailed',
'payload' => [
'message' => [
'id' => '12345',
'token' => 'abcdef123',
'direction' => 'outgoing',
'message_id' => '5817a64332f44_4ec93ff59e79d154565eb@app34.mail',
'to' => 'test@example.com',
'from' => 'sales@awesomeapp.com',
'subject' => 'Welcome to AwesomeApp',
'timestamp' => 1477945177.12994,
'id' => '12345',
'token' => 'abcdef123',
'direction' => 'outgoing',
'message_id' => '5817a64332f44_4ec93ff59e79d154565eb@app34.mail',
'to' => 'test@example.com',
'from' => 'sales@awesomeapp.com',
'subject' => 'Welcome to AwesomeApp',
'timestamp' => 1477945177.12994,
'spam_status' => 'NotSpam',
'tag' => 'welcome'
'tag' => 'welcome'
],
],
],
Expand All @@ -114,30 +110,30 @@ private function getBouncedParameters(): array
{
return [
[
'event' => 'MessageBounced',
'event' => 'MessageBounced',
'payload' => [
'original_message' => [
'id' => '12345',
'token' => 'abcdef123',
'direction' => 'outgoing',
'message_id' => '5817a64332f44_4ec93ff59e79d154565eb@app34.mail',
'to' => 'test@example.com',
'from' => 'sales@awesomeapp.com',
'subject' => 'Welcome to AwesomeApp',
'timestamp' => 1477945177.12994,
'id' => '12345',
'token' => 'abcdef123',
'direction' => 'outgoing',
'message_id' => '5817a64332f44_4ec93ff59e79d154565eb@app34.mail',
'to' => 'test@example.com',
'from' => 'sales@awesomeapp.com',
'subject' => 'Welcome to AwesomeApp',
'timestamp' => 1477945177.12994,
'spam_status' => 'NotSpam',
'tag' => 'welcome'
'tag' => 'welcome'
],
'bounce' => [
'id' => '12345',
'token' => 'abcdef124',
'direction' => 'incoming',
'to' => 'abcde@psrp.postal.yourdomain.com',
'from' => 'postmaster@someserver.com',
'subject' => 'Delivery Error',
'timestamp' => 1477945179.12994,
'id' => '12345',
'token' => 'abcdef124',
'direction' => 'incoming',
'to' => 'abcde@psrp.postal.yourdomain.com',
'from' => 'postmaster@someserver.com',
'subject' => 'Delivery Error',
'timestamp' => 1477945179.12994,
'spam_status' => 'NotSpam',
'tag' => null
'tag' => null
],
],
],
Expand All @@ -153,4 +149,4 @@ private function createContact(string $email): Lead

return $lead;
}
}
}

0 comments on commit b3afd81

Please sign in to comment.