create email and emailer with tests

This commit is contained in:
Yisroel Baum 2025-11-17 20:45:32 +02:00
parent 86787b7d3f
commit 962614ea02
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
4 changed files with 168 additions and 0 deletions

View file

@ -0,0 +1,27 @@
<?php
namespace Tests\Fakes\Email;
use FreightQuote\Email\Email;
use FreightQuote\Email\Emailer;
class FakeEmailer implements Emailer
{
private int $sentEmailCount = 0;
public function getSentEmailCount(): int
{
return $this->sentEmailCount;
}
public function send(Email $email): bool
{
if (count($email->getRecipients()) > 0) {
$this->sentEmailCount++;
return true;
}
return false;
}
}