Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assertMailRecipientStructEvent example
static
::
assertEquals
(
'/account/register',
$response
->
getTargetUrl
(
)
)
;
$session
=
$this
->
getSession
(
)
;
static
::
assertInstanceOf
(
Session::
class
,
$session
)
;
$success
=
$session
->
getFlashBag
(
)
->
get
(
'success'
)
;
static
::
assertNotEmpty
(
$success
)
;
static
::
assertEquals
(
$container
->
get
(
'translator'
)
->
trans
(
'account.optInRegistrationAlert'
)
,
$success
[
0
]
)
;
static
::
assertNotEmpty
(
$event
)
;
static
::
assertMailEvent
(
CustomerDoubleOptInRegistrationEvent::
class
,
$event
,
$this
->salesChannelContext
)
;
static
::
assertMailRecipientStructEvent
(
$this
->
getMailRecipientStruct
(
$data
->
all
(
)
)
,
$event
)
;
static
::
assertStringEndsWith
(
'&redirectTo=frontend.checkout.confirm.page',
$event
->
getConfirmUrl
(
)
)
;
}
public
function
testRegisterWithDoubleOptInDomainChanged
(
)
: void
{
$container
=
$this
->
getContainer
(
)
;
/** @var EntityRepository $customerRepository */
$customerRepository
=
$container
->
get
(
'customer.repository'
)
;