Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
StorefrontPluginConfigurationFactory example
class
ThemeFileResolverTest
extends
TestCase
{
use
KernelTestBehaviour;
public
function
testResolvedFilesIncludeSkinScssPath
(
)
: void
{
$themePluginBundle
=
new
ThemeWithStorefrontSkinScss
(
)
;
$storefrontBundle
=
new
MockStorefront
(
)
;
$factory
=
new
StorefrontPluginConfigurationFactory
(
$this
->
getContainer
(
)
->
getParameter
(
'kernel.project_dir'
)
)
;
$config
=
$factory
->
createFromBundle
(
$themePluginBundle
)
;
$storefront
=
$factory
->
createFromBundle
(
$storefrontBundle
)
;
$configCollection
=
new
StorefrontPluginConfigurationCollection
(
)
;
$configCollection
->
add
(
$config
)
;
$configCollection
->
add
(
$storefront
)
;
$projectDir
=
$this
->
getContainer
(
)
->
getParameter
(
'kernel.project_dir'
)
;
$themeFileResolver
=
new
ThemeFileResolver
(
new
ThemeFileImporter
(
$projectDir
)
)
;
$resolvedFiles
=
$themeFileResolver
->
resolveFiles
(