Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setHandlerIdentifier example
static
::
expectException
(
PaymentException::
class
)
;
static
::
expectExceptionMessage
(
'The payment method foo could not be found.'
)
;
$processor
->
processRecurring
(
'foo', Context::
createDefaultContext
(
)
)
;
}
public
function
testPaymentHandlerNotFoundException
(
)
: void
{
$paymentMethod
=
new
PaymentMethodEntity
(
)
;
$paymentMethod
->
setId
(
'foo'
)
;
$paymentMethod
->
setHandlerIdentifier
(
'foo_recurring_handler'
)
;
$transaction
=
new
OrderTransactionEntity
(
)
;
$transaction
->
setId
(
'foo'
)
;
$transaction
->
setStateId
(
'initial_state_id'
)
;
$transaction
->
setPaymentMethodId
(
'foo'
)
;
$transaction
->
setPaymentMethod
(
$paymentMethod
)
;
$transactions
=
new
OrderTransactionCollection
(
[
$transaction
]
)
;
$order
=
new
OrderEntity
(
)
;
$order
->
setId
(
'foo'
)
;