Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ReinstallAppsStrategy example
static
::
callback
(
static
fn
(
Manifest
$manifest
)
: bool =>
$manifest
->
getPath
(
)
===
$appDir
)
,
$app
->
getId
(
)
,
static
::
isType
(
'string'
)
,
static
::
isInstanceOf
(
Context::
class
)
)
;
$eventDispatcher
=
$this
->
createMock
(
EventDispatcherInterface::
class
)
;
$eventDispatcher
->
expects
(
static
::
once
(
)
)
->
method
(
'dispatch'
)
->
with
(
static
::
isInstanceOf
(
AppInstalledEvent::
class
)
)
;
$reinstallAppsResolver
=
new
ReinstallAppsStrategy
(
$this
->
getAppLoader
(
$appDir
)
,
$this
->
getContainer
(
)
->
get
(
'app.repository'
)
,
$registrationsService
,
$this
->systemConfigService,
$eventDispatcher
)
;
$reinstallAppsResolver
->
resolve
(
$this
->context
)
;
static
::
assertNotEquals
(
$shopId
,
$this
->shopIdProvider->
getShopId
(
)
)
;