Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ThemeCompilerEnrichScssVarSubscriber example
new
\
DateTime
(
)
,
]
,
]
,
]
)
;
$storefrontPluginRegistry
=
$this
->
createMock
(
StorefrontPluginRegistry::
class
)
;
$storefrontPluginRegistry
->
method
(
'getConfigurations'
)
->
willReturn
(
new
StorefrontPluginConfigurationCollection
(
[
new
StorefrontPluginConfiguration
(
'test'
)
,
]
)
)
;
$subscriber
=
new
ThemeCompilerEnrichScssVarSubscriber
(
$configService
,
$storefrontPluginRegistry
)
;
$event
=
new
ThemeCompilerEnrichScssVariablesEvent
(
[
'bla' => 'any'
]
,
TestDefaults::SALES_CHANNEL,
Context::
createDefaultContext
(
)
)
;
$backupEvent
=
clone
$event
;
$subscriber
->
enrichExtensionVars
(
$event
)
;
new
SimplePlugin
(
true, __DIR__ . '/fixtures/SimplePlugin'
)
,
]
)
;
$storefrontPluginRegistry
=
$this
->
getStorefrontPluginRegistry
(
[
new
SimplePlugin
(
true, __DIR__ . '/fixtures/SimplePlugin'
)
,
]
)
;
$subscriber
=
new
ThemeCompilerEnrichScssVarSubscriber
(
$configService
,
$storefrontPluginRegistry
)
;
$stderr
=
fopen
(
'php://stderr', 'wb'
)
;
$subscriber
->
enrichExtensionVars
(
new
ThemeCompilerEnrichScssVariablesEvent
(
[
]
, TestDefaults::SALES_CHANNEL, Context::
createDefaultContext
(
)
)
)
;
}
/** * Theme compilation should be able to run without a database connection. */
public
function
testCompileWithoutDB
(
)
: void
{
$this
->
stopTransactionAfter
(
)
;