use Symfony\Component\Messenger\Stamp\StampInterface;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
use Symfony\Component\Mime\RawMessage;
class MailerTest extends TestCase
{ public function testSendingRawMessages() { $this->
expectException(LogicException::
class);
$transport =
new Mailer($this->
createMock(TransportInterface::
class),
$this->
createMock(MessageBusInterface::
class),
$this->
createMock(EventDispatcherInterface::
class));
$transport->
send(new RawMessage('Some raw email message'
));
} public function testSendMessageToBus() { $bus =
new class() implements MessageBusInterface
{ public array
$messages =
[];
public array
$stamps =
[];
public function dispatch($message, array
$stamps =
[]): Envelope
{