Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setDoubleOptInEmailSentDate example
protected
function
mockCustomer
(
)
: CustomerEntity
{
$customer
=
new
CustomerEntity
(
)
;
$customer
->
setId
(
'customer-1'
)
;
$customer
->
setActive
(
Feature::
isActive
(
'v6.6.0.0'
)
)
;
$customer
->
setEmail
(
'test@test.test'
)
;
$customer
->
setHash
(
'hash'
)
;
$customer
->
setGuest
(
false
)
;
$customer
->
setDoubleOptInRegistration
(
true
)
;
$customer
->
setDoubleOptInEmailSentDate
(
new
\
DateTime
(
)
)
;
return
$customer
;
}
protected
function
mockRequestDataBag
(
)
: RequestDataBag
{
return
new
RequestDataBag
(
[
'hash' => 'hash',
'em' =>
hash
(
'sha1', 'test@test.test'
)
,
]
)
;
}
}