Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
Chatter example
$message
=
new
DummyMessage
(
)
;
$sentMessage
=
new
SentMessage
(
$message
, 'any'
)
;
$this
->transport
->
expects
(
$this
->
once
(
)
)
->
method
(
'send'
)
->
with
(
$message
)
->
willReturn
(
$sentMessage
)
;
$chatter
=
new
Chatter
(
$this
->transport
)
;
$this
->
assertSame
(
$sentMessage
,
$chatter
->
send
(
$message
)
)
;
$this
->
assertSame
(
$message
,
$sentMessage
->
getOriginalMessage
(
)
)
;
}
public
function
testSendWithBus
(
)
{
$message
=
new
DummyMessage
(
)
;
$this
->transport
->
expects
(
$this
->
never
(
)
)
->
method
(
'send'
)