Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
StaticFileConfigDumper example
public
function
testDumping
(
)
: void
{
$loader
=
$this
->
createMock
(
DatabaseConfigLoader::
class
)
;
$loader
->
method
(
'load'
)
->
willReturn
(
new
StorefrontPluginConfiguration
(
'Test'
)
)
;
$fs
=
$this
->
createMock
(
Filesystem::
class
)
;
$fs
->
expects
(
static
::
exactly
(
4
)
)
->
method
(
'write'
)
;
$themeProvider
=
$this
->
createMock
(
DatabaseAvailableThemeProvider::
class
)
;
$themeProvider
->
method
(
'load'
)
->
willReturn
(
[
'test' => 'test'
]
)
;
$dumper
=
new
StaticFileConfigDumper
(
$loader
,
$themeProvider
,
$fs
)
;
$dumper
->
dumpConfig
(
Context::
createDefaultContext
(
)
)
;
$dumper
->
dumpConfigFromEvent
(
)
;
}
}