Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ShippingMethodValidator example
'priority' => 2,
]
,
]
,
[
'id' => 'D1'
]
,
$this
->
createMock
(
EntityExistence::
class
)
,
'/0/'
)
;
$fakeConnection
=
new
FakeConnection
(
[
]
)
;
$event
=
new
PreWriteValidationEvent
(
$this
->context,
$commands
)
;
$validator
=
new
ShippingMethodValidator
(
$fakeConnection
)
;
$validator
->
preValidate
(
$event
)
;
$exception
= null;
try
{
$event
->
getExceptions
(
)
->
tryToThrow
(
)
;
}
catch
(
WriteException
$e
)
{
$exception
=
$e
;
}
if
(
!
$success
)
{