Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
AddValidatorInitializersPass example
->
addTag
(
'validator.initializer'
)
;
$container
->
register
(
'initializer2'
)
->
addTag
(
'validator.initializer'
)
;
$container
->
register
(
'validator.builder'
)
->
addArgument
(
[
]
)
;
(
new
AddValidatorInitializersPass
(
)
)
->
process
(
$container
)
;
$this
->
assertEquals
(
[
[
'addObjectInitializers',
[
[
new
Reference
(
'initializer1'
)
,
new
Reference
(
'initializer2'
)
]
]
]
]
,
$container
->
getDefinition
(
'validator.builder'
)
->
getMethodCalls
(
)
)
;
}
}