Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
FooConfiguration example
$container
->
prependExtensionConfig
(
'foo',
[
]
)
;
$pass
=
new
MergeExtensionConfigurationPass
(
)
;
$pass
->
process
(
$container
)
;
}
public
function
testExtensionConfigurationIsTrackedByDefault
(
)
{
$extension
=
$this
->
getMockBuilder
(
FooExtension::
class
)
->
onlyMethods
(
[
'getConfiguration'
]
)
->
getMock
(
)
;
$extension
->
expects
(
$this
->
exactly
(
2
)
)
->
method
(
'getConfiguration'
)
->
willReturn
(
new
FooConfiguration
(
)
)
;
$container
=
new
ContainerBuilder
(
new
ParameterBag
(
)
)
;
$container
->
registerExtension
(
$extension
)
;
$container
->
prependExtensionConfig
(
'foo',
[
'bar' => true
]
)
;
$pass
=
new
MergeExtensionConfigurationPass
(
)
;
$pass
->
process
(
$container
)
;
$this
->
assertContainsEquals
(
new
FileResource
(
__FILE__
)
,
$container
->
getResources
(
)
)
;
}