You are here

public function SmsFrameworkMessageEntityTest::testChunkByRecipientsEntity in SMS Framework 8

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

Tests chunked SMS messages are unsaved entities.

@covers ::chunkByRecipients

File

tests/src/Kernel/SmsFrameworkMessageEntityTest.php, line 228

Class

SmsFrameworkMessageEntityTest
Tests SMS message entity.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testChunkByRecipientsEntity() {
  $sms_message = $this
    ->createSmsMessage();
  $sms_message
    ->addRecipients([
    '100',
    '200',
  ]);
  $sms_messages = $sms_message
    ->chunkByRecipients(1);
  $this
    ->assertTrue($sms_messages[0]
    ->isNew());
  $this
    ->assertTrue($sms_messages[1]
    ->isNew());
}