You are here

public function SmsFrameworkProviderTest::testNoChunking in SMS Framework 8

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

Test message is not into multiple messages if gateway defines no chunking.

File

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

Class

SmsFrameworkProviderTest
Tests SMS Framework provider service.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testNoChunking() {
  $sms_message = $this
    ->createSmsMessage()
    ->setGateway($this->gateway)
    ->addRecipients($this
    ->randomPhoneNumbers());
  $this->smsProvider
    ->queue($sms_message);
  $this
    ->assertEquals(1, count(SmsMessage::loadMultiple()), 'SMS message has not been split.');
}