Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
CustomApplication example
$helperSet
=
$application
->
getHelperSet
(
)
;
$this
->
assertTrue
(
$helperSet
->
has
(
'formatter'
)
)
;
// no other default helper set should be returned
$this
->
assertFalse
(
$helperSet
->
has
(
'dialog'
)
)
;
$this
->
assertFalse
(
$helperSet
->
has
(
'progress'
)
)
;
}
public
function
testOverwritingDefaultHelperSetOverwritesDefaultValues
(
)
{
$application
=
new
CustomApplication
(
)
;
$application
->
setAutoExit
(
false
)
;
$application
->
setCatchExceptions
(
false
)
;
$application
->
setHelperSet
(
new
HelperSet
(
[
new
FormatterHelper
(
)
]
)
)
;
$helperSet
=
$application
->
getHelperSet
(
)
;
$this
->
assertTrue
(
$helperSet
->
has
(
'formatter'
)
)
;
// no other default helper set should be returned
$this
->
assertFalse
(
$helperSet
->
has
(
'dialog'
)
)
;