public function SmsFrameworkProcessorTest::testIncomingNoResult in SMS Framework 2.1.x
Same name and namespace in other branches
- 8 tests/src/Kernel/SmsFrameworkProcessorTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkProcessorTest::testIncomingNoResult()
- 2.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 79
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
->expectException(SmsPluginReportException::class);
$this
->expectExceptionMessage('Missing result for message.');
$this->smsProvider
->queue($sms_message);
}