Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createStateMachine example
$this
->
expectException
(
StateMachineException::
class
)
;
$context
= Context::
createDefaultContext
(
)
;
$this
->stateMachineRegistry->
getStateMachine
(
'wusel',
$context
)
;
}
public
function
testStateMachineShouldIncludeRelations
(
)
: void
{
$context
= Context::
createDefaultContext
(
)
;
$this
->
createStateMachine
(
$context
)
;
$stateMachine
=
$this
->stateMachineRegistry->
getStateMachine
(
$this
->stateMachineName,
$context
)
;
static
::
assertNotNull
(
$stateMachine
->
getStates
(
)
)
;
static
::
assertEquals
(
3,
$stateMachine
->
getStates
(
)
->
count
(
)
)
;
static
::
assertNotNull
(
$stateMachine
->
getTransitions
(
)
)
;
static
::
assertEquals
(
4,
$stateMachine
->
getTransitions
(
)
->
count
(
)
)
;
}
public
function
testStateMachineAvailableTransitionShouldIncludeReOpenAndReTourTransition
(
)
: void
{