You are here

public function SmsFrameworkProviderTest::testQueueOutSkipQueue in SMS Framework 2.x

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

Test sending standard SMS object queue out skips queue.

File

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

Class

SmsFrameworkProviderTest
Tests SMS Framework provider service.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testQueueOutSkipQueue() {
  $this->gateway
    ->setSkipQueue(TRUE)
    ->save();
  $sms_message = new StandardSmsMessage('', [], '', [], NULL);
  $sms_message
    ->addRecipients($this
    ->randomPhoneNumbers())
    ->setMessage($this
    ->randomString())
    ->setDirection(Direction::OUTGOING);
  $this->smsProvider
    ->queue($sms_message);
  $this
    ->assertEquals(1, count($this
    ->getTestMessages($this->gateway)), 'One standard SMS send skipped queue.');
}