Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
Migration1648803451FixInvalidMigrationOfBusinessEventToFlow example
'active' => true,
'createdAt'
=>
(
new
\
DateTime
(
)
)
->
format
(
Defaults::STORAGE_DATE_TIME_FORMAT
)
,
'rules' =>
$ruleIds
,
]
;
$this
->eventActionRepository->
create
(
$data
, Context::
createDefaultContext
(
)
)
;
$migration
=
new
Migration1632215760MoveDataFromEventActionToFlow
(
)
;
$migration
->
update
(
$this
->connection
)
;
$newMigration
=
new
Migration1648803451FixInvalidMigrationOfBusinessEventToFlow
(
)
;
$newMigration
->
update
(
$this
->connection
)
;
$flowsSequence
=
$this
->connection->
fetchAllAssociative
(
'SELECT * from `flow_sequence`'
)
;
static
::
assertCount
(
4,
$flowsSequence
)
;
$actionSequence
=
array_values
(
array_filter
(
$flowsSequence
,
fn
(
$sequence
)
=>
$sequence
[
'action_name'
]
!== null
)
)
;
static
::
assertCount
(
2,
$actionSequence
)
;
static
::
assertNotEquals
(
$actionSequence
[
0
]
[
'parent_id'
]
,
$actionSequence
[
1
]
[
'parent_id'
]
)
;
}