Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
mockRequestDataBag example
->
willReturn
(
new
EntitySearchResult
(
'customer',
1,
new
CustomerCollection
(
[
$customer
]
)
,
null,
new
Criteria
(
)
,
$this
->context->
getContext
(
)
)
)
;
$confirmResult
=
$this
->route->
confirm
(
$this
->
mockRequestDataBag
(
)
,
$this
->context
)
;
static
::
assertTrue
(
$confirmResult
->headers->
has
(
PlatformRequest::HEADER_CONTEXT_TOKEN
)
)
;
}
public
function
testConfirmCustomerNotDoubleOptIn
(
)
: void
{
$customer
=
$this
->
mockCustomer
(
)
;
$customer
->
setDoubleOptInRegistration
(
false
)
;
$this
->customerRepository->
expects
(
static
::
once
(
)
)
->
method
(
'search'
)