public function SmsFrameworkProviderTest::testQueueNoDirection in SMS Framework 2.1.x
Same name and namespace in other branches
- 8 tests/src/Kernel/SmsFrameworkProviderTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkProviderTest::testQueueNoDirection()
- 2.x tests/src/Kernel/SmsFrameworkProviderTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkProviderTest::testQueueNoDirection()
Ensures exception if missing direction for queue method.
@covers ::queue
File
- tests/
src/ Kernel/ SmsFrameworkProviderTest.php, line 208
Class
- SmsFrameworkProviderTest
- Tests SMS Framework provider service.
Namespace
Drupal\Tests\sms\KernelCode
public function testQueueNoDirection() {
$sms_message = SmsMessage::create()
->setMessage($this
->randomString())
->addRecipients($this
->randomPhoneNumbers());
$this
->expectException(SmsDirectionException::class);
$this
->expectExceptionMessage('Missing direction for message.');
$this->smsProvider
->queue($sms_message);
}