Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
DataCollector example
->
method
(
'indices'
)
->
willReturn
(
[
'indices' =>
[
'index1' =>
[
'status' => 'green'
]
, 'index2' =>
[
'status' => 'green'
]
]
]
)
;
$client
->
method
(
'cluster'
)
->
willReturn
(
$clusterMock
)
;
$client
->
method
(
'cat'
)
->
willReturn
(
$catMock
)
;
$collector
=
new
DataCollector
(
true,
true,
$client
,
$client
)
;
static
::
assertSame
(
'elasticsearch',
$collector
->
getName
(
)
)
;
$collector
->
collect
(
new
Request
(
)
,
new
Response
(
)
)
;