Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getOrderTransactionState example
$this
->
prepareProductTest
(
)
;
$this
->
createCustomerAndLogin
(
)
;
$this
->
submitOrder
(
)
;
$orderId
=
$this
->
getOrderId
(
)
;
$orderStateAfterAction
=
$this
->
getOrderState
(
$orderId
)
;
static
::
assertSame
(
$orderState
,
$orderStateAfterAction
)
;
$orderDeliveryStateAfterAction
=
$this
->
getOderDeliveryState
(
$orderId
)
;
static
::
assertSame
(
$orderDeliveryState
,
$orderDeliveryStateAfterAction
)
;
$orderTransactionStateAfterAction
=
$this
->
getOrderTransactionState
(
$orderId
)
;
static
::
assertSame
(
$orderTransactionState
,
$orderTransactionStateAfterAction
)
;
}
public
function
testSetAvailableOrderStateWithNotAvailableState
(
)
: void
{
$orderState
= 'done';
$orderDeliveryState
= 'cancelled';
$orderTransactionState
= 'cancelled';
$this
->
prepareFlowSequences
(
$orderState
,
$orderDeliveryState
,
$orderTransactionState
)
;
$this
->
prepareProductTest
(
)
;
$this
->
createCustomerAndLogin
(
)
;