Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
SmsChannel example
/** * @author Smaïne Milianni <
[email protected]
> */
final
class
NotifierTest
extends
TestCase
{
public
function
testItThrowAnExplicitErrorIfAnSmsChannelDoesNotHaveRecipient
(
)
{
$this
->
expectException
(
LogicException::
class
)
;
$this
->
expectExceptionMessage
(
'The "sms" channel needs a Recipient.'
)
;
$notifier
=
new
Notifier
(
[
'sms' =>
new
SmsChannel
(
new
NullTransport
(
)
)
]
)
;
$notifier
->
send
(
new
Notification
(
'Hello World!',
[
'sms/twilio'
]
)
)
;
}
}