Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createCustomFields example
static
::
assertFalse
(
$this
->
columnExists
(
$con
)
)
;
$m
=
new
Migration1681382023AddCustomFieldAllowCartExpose
(
)
;
$m
->
update
(
$con
)
;
static
::
assertTrue
(
$this
->
columnExists
(
$con
)
)
;
$con
->
setNestTransactionsWithSavepoints
(
true
)
;
$con
->
beginTransaction
(
)
;
$this
->
createCustomFields
(
)
;
$this
->
createRule
(
)
;
static
::
assertEquals
(
[
'0', '0', '0'
]
,
$this
->
getExposeSettings
(
$con
)
)
;
$m
->
update
(
$con
)
;
static
::
assertEquals
(
[
'1', '0', '1'
]
,
$this
->
getExposeSettings
(
$con
)
)
;
$con
->
rollBack
(
)
;
}