Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ArrayResponse example
$this
->
expectExceptionObject
(
new
TransportException
(
$exception
->
getMessage
(
)
, 0,
$exception
)
)
;
$connection
->
reject
(
(string)
$id
)
;
}
public
function
testMessageCount
(
)
{
$tube
= 'baz';
$count
= 51;
$response
=
new
ArrayResponse
(
'OK',
[
'current-jobs-ready' =>
$count
]
)
;
$client
=
$this
->
createMock
(
PheanstalkInterface::
class
)
;
$client
->
expects
(
$this
->
once
(
)
)
->
method
(
'statsTube'
)
->
with
(
$tube
)
->
willReturn
(
$response
)
;
$connection
=
new
Connection
(
[
'tube_name' =>
$tube
]
,
$client
)
;
$this
->
assertSame
(
$count
,
$connection
->
getMessageCount
(
)
)
;
}
public
function
testMessageCountWhenABeanstalkdExceptionOccurs
(
)
{