Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
pluginUpdate example
$handler
=
$this
->
createMock
(
ThemeLifecycleHandler::
class
)
;
$handler
->
expects
(
static
::
never
(
)
)
->
method
(
'handleThemeInstallOrUpdate'
)
;
$subscriber
=
new
PluginLifecycleSubscriber
(
$this
->
createMock
(
StorefrontPluginRegistry::
class
)
,
__DIR__,
$this
->
createMock
(
AbstractStorefrontPluginConfigurationFactory::
class
)
,
$handler
,
$this
->
createMock
(
ThemeLifecycleService::
class
)
)
;
$subscriber
->
pluginUpdate
(
$event
)
;
}
private
function
getPlugin
(
)
: PluginEntity
{
return
(
new
PluginEntity
(
)
)
->
assign
(
[
'path'
=>
(
new
\
ReflectionClass
(
SwagTest::
class
)
)
->
getFileName
(
)
,
'baseClass' => SwagTest::
class
,
]
)
;
}
}