You are here

public function SmsFrameworkProviderTest::testSkipQueue in SMS Framework 2.1.x

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

Test message is sent immediately.

File

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

Class

SmsFrameworkProviderTest
Tests SMS Framework provider service.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testSkipQueue() {
  $this->gateway
    ->setSkipQueue(TRUE)
    ->save();
  $sms_message = $this
    ->createSmsMessage()
    ->addRecipients($this
    ->randomPhoneNumbers());
  $this->smsProvider
    ->queue($sms_message);
  $this
    ->assertEquals(1, count($this
    ->getTestMessages($this->gateway)));
}