Skip to content

Commit d278dad

Browse files
committed
wip
1 parent 50bbd49 commit d278dad

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* An email has been sent.
77
*/
8-
final readonly class EmailSent
8+
final readonly class EmailWasSent
99
{
1010
public function __construct(
1111
public Email $email,

packages/mailer/src/GenericMailer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function send(Email $email): SentEmail
2929
->with(fn (Email $from) => new EmailToSymfonyEmailMapper($this->mailerConfig, $this->viewRenderer)->map($from, null))
3030
->do();
3131

32-
$this->eventBus?->dispatch(new EmailSent($email));
32+
$this->eventBus?->dispatch(new EmailWasSent($email));
3333

3434
return new SentGenericEmail(
3535
original: $email,

packages/mailer/src/Testing/TestingMailer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Tempest\EventBus\EventBus;
66
use Tempest\Mail\Email;
7-
use Tempest\Mail\EmailSent;
7+
use Tempest\Mail\EmailWasSent;
88
use Tempest\Mail\EmailToSymfonyEmailMapper;
99
use Tempest\Mail\Mailer;
1010
use Tempest\Mail\MailerConfig;
@@ -35,7 +35,7 @@ public function send(Email $email): SentTestingEmail
3535
->with(fn (Email $from) => new EmailToSymfonyEmailMapper($this->mailerConfig, $this->viewRenderer)->map($from, null))
3636
->do();
3737

38-
$this->eventBus?->dispatch(new EmailSent($email));
38+
$this->eventBus?->dispatch(new EmailWasSent($email));
3939

4040
return new SentTestingEmail(
4141
original: $email,

tests/Integration/Mailer/MailerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Tempest\EventBus\EventBus;
66
use Tempest\Mail\Attachment;
7-
use Tempest\Mail\EmailSent;
7+
use Tempest\Mail\EmailWasSent;
88
use Tempest\Mail\Exceptions\RecipientWasMissing;
99
use Tempest\Mail\Exceptions\SenderWasMissing;
1010
use Tempest\Mail\GenericEmail;
@@ -24,7 +24,7 @@ public function test_event(): void
2424

2525
$this->container
2626
->get(EventBus::class)
27-
->listen(function (EmailSent $event) use (&$sent): void {
27+
->listen(function (EmailWasSent $event) use (&$sent): void {
2828
$sent = $event;
2929
});
3030

@@ -35,7 +35,7 @@ public function test_event(): void
3535
3636
));
3737

38-
$this->assertInstanceOf(EmailSent::class, $sent);
38+
$this->assertInstanceOf(EmailWasSent::class, $sent);
3939
}
4040

4141
public function test_default_sender(): void

0 commit comments

Comments
 (0)