You are here

public function SmsFrameworkMessageTestTrait::testRecipientsAdd in SMS Framework 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/SmsFrameworkMessageTestTrait.php \Drupal\Tests\sms\Functional\SmsFrameworkMessageTestTrait::testRecipientsAdd()
  2. 2.1.x tests/src/Functional/SmsFrameworkMessageTestTrait.php \Drupal\Tests\sms\Functional\SmsFrameworkMessageTestTrait::testRecipientsAdd()

Tests adding multiple recipients to SMS messages.

@covers ::addRecipients

File

tests/src/Functional/SmsFrameworkMessageTestTrait.php, line 102

Class

SmsFrameworkMessageTestTrait
SMS Message object test trait.

Namespace

Drupal\Tests\sms\Functional

Code

public function testRecipientsAdd() {
  $recipient1 = '123123123';
  $recipient2 = '456456456';
  $sms_message2 = $this
    ->createSmsMessage();
  $sms_message2
    ->addRecipients([
    $recipient1,
    $recipient2,
  ]);
  $this
    ->assertEquals([
    $recipient1,
    $recipient2,
  ], $sms_message2
    ->getRecipients());
}