Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
EntityIndexingSubscriber example
public
function
testGetSubscribedEvents
(
)
: void
{
static
::
assertArrayHasKey
(
EntityWrittenContainerEvent::
class
, EntityIndexingSubscriber::
getSubscribedEvents
(
)
)
;
}
public
function
testRefresh
(
)
: void
{
$registry
=
$this
->
createMock
(
EntityIndexerRegistry::
class
)
;
$registry
->
expects
(
static
::
once
(
)
)
->
method
(
'refresh'
)
;
$subscriber
=
new
EntityIndexingSubscriber
(
$registry
)
;
$subscriber
->
refreshIndex
(
new
EntityWrittenContainerEvent
(
Context::
createDefaultContext
(
)
,
new
NestedEventCollection
(
)
,
[
]
)
)
;
}
}