Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
NewsletterRecipientCollection example
'option' => 'direct',
'firstName' => 'Y',
'lastName' => 'Tran',
]
)
;
$newsletterRecipientEntity
=
new
NewsletterRecipientEntity
(
)
;
$newsletterRecipientEntity
->
setId
(
Uuid::
randomHex
(
)
)
;
$newsletterRecipientEntity
->
setConfirmedAt
(
new
\
DateTime
(
)
)
;
$entityRepository
=
new
StaticEntityRepository
(
[
[
$newsletterRecipientEntity
->
getId
(
)
]
,
new
NewsletterRecipientCollection
(
[
$newsletterRecipientEntity
]
)
,
]
)
;
$systemConfig
=
new
StaticSystemConfigService
(
[
TestDefaults::SALES_CHANNEL =>
[
'core.newsletter.doubleOptIn' => true,
]
,
]
)
;
$eventDispatcher
=
$this
->
createMock
(
EventDispatcherInterface::
class
)
;
$eventDispatcher
->
expects
(
static
::
once
(
)
)