Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getRequestAmount example
$client
)
;
static
::
assertSame
(
'elasticsearch',
$collector
->
getName
(
)
)
;
$collector
->
collect
(
new
Request
(
)
,
new
Response
(
)
)
;
static
::
assertEquals
(
600,
$collector
->
getTime
(
)
)
;
static
::
assertEquals
(
3,
$collector
->
getRequestAmount
(
)
)
;
static
::
assertCount
(
3,
$collector
->
getRequests
(
)
)
;
static
::
assertEquals
(
[
'status' => 'green'
]
,
$collector
->
getClusterInfo
(
)
)
;
static
::
assertEquals
(
[
'indices' =>
[
'index1' =>
[
'status' => 'green'
]
, 'index2' =>
[
'status' => 'green'
]
]
]
,
$collector
->
getIndices
(
)
)
;
}
public
function
testReset
(
)
: void
{
$client
=
$this
->
createMock
(
ClientProfiler::
class
)
;
$client
->
method
(
'getCalledRequests'
)
->
willReturn
(
[
[