Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createTags example
$this
->faker =
$context
->
getFaker
(
)
;
$this
->io =
$context
->
getConsole
(
)
;
$this
->
createFlows
(
$context
->
getContext
(
)
,
$numberOfItems
)
;
}
private
function
createFlows
(
Context
$context
, int
$count
)
: void
{
$this
->io->
progressStart
(
$count
)
;
$this
->
createTags
(
$context
)
;
$events
=
$this
->eventCollector->
collect
(
$context
)
->
getElements
(
)
;
$payload
=
[
]
;
$maxSequenceTree
= 5;
$maxSequencePerTree
= 10;
$eventNames
=
[
]
;
for
(
$i
= 0;
$i
<
$count
; ++
$i
)
{
$this
->orderTransactionStateHandler =
$this
->
getContainer
(
)
->
get
(
OrderTransactionStateHandler::
class
)
;
$this
->flowRepository =
$this
->
getContainer
(
)
->
get
(
'flow.repository'
)
;
$this
->tagRepository =
$this
->
getContainer
(
)
->
get
(
'tag.repository'
)
;
$this
->customerId =
$this
->
createCustomer
(
)
;
$this
->salesChannelContext =
$this
->
createDefaultSalesChannelContext
(
)
;
}
public
function
testFlowExecutesWithIfSequencesEvaluated
(
)
: void
{
$ids
=
new
IdsCollection
(
)
;
$this
->
createTags
(
$ids
)
;
$this
->
createFlow
(
$ids
)
;
$this
->
placeOrder
(
$ids
)
;
$this
->orderRepository->
update
(
[
[
'id' =>
$ids
->
get
(
'order'
)
,
'tags' =>
[
[
'id' =>
$ids
->
get
(
'tag-1'
)
]
,
]
,
]
,