public function SmsFrameworkProcessorTest::testIncomingNoResult in SMS Framework 8
Same name and namespace in other branches
- 2.x tests/src/Kernel/SmsFrameworkProcessorTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkProcessorTest::testIncomingNoResult()
- 2.1.x tests/src/Kernel/SmsFrameworkProcessorTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkProcessorTest::testIncomingNoResult()
Ensure exception thrown if incoming message is missing a result.
@covers ::ensureReportsPreprocess
File
- tests/
src/ Kernel/ SmsFrameworkProcessorTest.php, line 77
Class
- SmsFrameworkProcessorTest
- Tests functionality provided by the SMS message event subscriber.
Namespace
Drupal\Tests\sms\KernelCode
public function testIncomingNoResult() {
$sms_message = SmsMessage::create()
->setDirection(Direction::INCOMING)
->setMessage($this
->randomString())
->addRecipients($this
->randomPhoneNumbers())
->setGateway($this->gatewayMemory);
$this
->setExpectedException(SmsPluginReportException::class, 'Missing result for message.');
$this->smsProvider
->queue($sms_message);
}