You are here

public function SmsFrameworkProviderTest::testQueueNoFallbackGateway in SMS Framework 8

Same name and namespace in other branches
  1. 2.x tests/src/Kernel/SmsFrameworkProviderTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkProviderTest::testQueueNoFallbackGateway()
  2. 2.1.x tests/src/Kernel/SmsFrameworkProviderTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkProviderTest::testQueueNoFallbackGateway()

Test message is not queued because no gateway is set.

@covers ::send

File

tests/src/Kernel/SmsFrameworkProviderTest.php, line 242

Class

SmsFrameworkProviderTest
Tests SMS Framework provider service.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testQueueNoFallbackGateway() {
  $this
    ->setFallbackGateway(NULL);
  $this
    ->setExpectedException(RecipientRouteException::class);
  $message = $this
    ->createSmsMessage()
    ->addRecipients($this
    ->randomPhoneNumbers());
  $this->smsProvider
    ->queue($message);
}