CodeExplorer setMailAttachmentsConfig example
$mail =
new Mail();
$envelope =
$this->
createMock(Envelope::
class);
$mailAttachmentsConfig =
new MailAttachmentsConfig( Context::
createDefaultContext(),
new MailTemplateEntity(),
new MailSendSubscriberConfig(false,
['foo', 'bar'
]),
[],
Uuid::
randomHex() );
$mail->
setMailAttachmentsConfig($mailAttachmentsConfig);
$this->decorated->
expects(static::
once())->
method('send'
)->
with($mail,
$envelope);
$this->attachmentsBuilder
->
expects(static::
once()) ->
method('buildAttachments'
) ->
with( $mailAttachmentsConfig->
getContext(),
$mailAttachmentsConfig->
getMailTemplate(),
$mailAttachmentsConfig->
getExtension(),
$mailAttachmentsConfig->
getEventConfig(),