Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createOrderWithRemoteAddress example
$this
->
getWriteParameterBagMock
(
)
)
->
current
(
)
;
static
::
assertTrue
(
true
)
;
}
public
function
testRemoteAddressSerializerAnonymize
(
)
: void
{
$this
->
setConfig
(
)
;
$remoteAddress
= '127.0.0.1';
$orderId
=
$this
->
createOrderWithRemoteAddress
(
$remoteAddress
)
;
$criteria
=
new
Criteria
(
)
;
$criteria
->
addFilter
(
new
EqualsFilter
(
'orderId',
$orderId
)
)
;
$result
=
$this
->
getContainer
(
)
->
get
(
'order_customer.repository'
)
->
search
(
$criteria
, Context::
createDefaultContext
(
)
)
->
first
(
)
;
static
::
assertNotEmpty
(
$result
)
;
static
::
assertNotSame
(
$remoteAddress
,
$result
->
getRemoteAddress
(
)
)
;
static
::
assertSame
(
IPUtils::
anonymize
(
$remoteAddress
)
,
$result
->
getRemoteAddress
(
)
)
;
}