Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
onNewCustomFieldCreated example
$this
->
createMock
(
Client::
class
)
,
$elasticsearchHelper
,
$connection
)
;
$containerEvent
=
new
EntityWrittenContainerEvent
(
Context::
createDefaultContext
(
)
,
new
NestedEventCollection
(
)
,
[
]
)
;
$customFieldUpdater
->
onNewCustomFieldCreated
(
$containerEvent
)
;
}
public
function
testElasticsearchDisabled
(
)
: void
{
$elasticsearchHelper
=
$this
->
createMock
(
ElasticsearchHelper::
class
)
;
$elasticsearchHelper
->
method
(
'allowIndexing'
)
->
willReturn
(
false
)
;
$indexDetector
=
$this
->
createMock
(
ElasticsearchOutdatedIndexDetector::
class
)
;
$indexDetector