Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
AppSyncPaymentHandler example
$qb
->
method
(
'from'
)
->
willReturnSelf
(
)
;
$qb
->
method
(
'leftJoin'
)
->
willReturnSelf
(
)
;
$qb
->
method
(
'andWhere'
)
->
willReturnSelf
(
)
;
$qb
->
method
(
'setParameter'
)
->
willReturnSelf
(
)
;
$qb
->
method
(
'executeQuery'
)
->
willReturn
(
$result
)
;
$connection
=
$this
->
createMock
(
Connection::
class
)
;
$connection
->
method
(
'createQueryBuilder'
)
->
willReturn
(
$qb
)
;
$sync
=
new
AppSyncPaymentHandler
(
$this
->
createMock
(
OrderTransactionStateHandler::
class
)
,
$this
->
createMock
(
StateMachineRegistry::
class
)
,
$this
->
createMock
(
PaymentPayloadService::
class
)
,
$this
->
createMock
(
EntityRepository::
class
)
,
)
;
$async
=
new
AppAsyncPaymentHandler
(
$this
->
createMock
(
OrderTransactionStateHandler::
class
)
,
$this
->
createMock
(
StateMachineRegistry::
class
)
,
$this
->
createMock
(
PaymentPayloadService::
class
)
,
$this
->
createMock
(
EntityRepository::
class
)
,
)
;