Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getReferencedVersionId example
static
::
assertEquals
(
$this
->
getContainer
(
)
->
get
(
OrderDefinition::
class
)
->
getEntityName
(
)
,
$historyEntry
->
getEntityName
(
)
)
;
if
(
!Feature::
isActive
(
'v6.6.0.0'
)
)
{
static
::
assertEquals
(
$orderId
,
$historyEntry
->
getEntityId
(
)
[
'id'
]
)
;
static
::
assertEquals
(
Defaults::LIVE_VERSION,
$historyEntry
->
getEntityId
(
)
[
'version_id'
]
)
;
return
;
}
static
::
assertEquals
(
$orderId
,
$historyEntry
->
getReferencedId
(
)
)
;
static
::
assertEquals
(
Defaults::LIVE_VERSION,
$historyEntry
->
getReferencedVersionId
(
)
)
;
}
public
function
testTransitionToNotAllowedState
(
)
: void
{
$context
= Context::
createDefaultContext
(
)
;
$customerId
=
$this
->
createCustomer
(
$context
)
;
$orderId
=
$this
->
createOrder
(
$customerId
,
$context
)
;
$this
->
getBrowser
(
)
->
request
(
'POST', '/api/_action/state-machine/order/' .
$orderId
. '/state/foo'
)
;
$response
=
$this
->
getBrowser
(
)
->
getResponse
(
)
->
getContent
(
)
;