public function SmsFrameworkMessageTestTrait::testOptionsRemove in SMS Framework 8
Same name and namespace in other branches
- 2.x tests/src/Functional/SmsFrameworkMessageTestTrait.php \Drupal\Tests\sms\Functional\SmsFrameworkMessageTestTrait::testOptionsRemove()
- 2.1.x tests/src/Functional/SmsFrameworkMessageTestTrait.php \Drupal\Tests\sms\Functional\SmsFrameworkMessageTestTrait::testOptionsRemove()
Tests recipients for SMS messages.
@covers ::removeOption
File
- tests/
src/ Functional/ SmsFrameworkMessageTestTrait.php, line 178
Class
- SmsFrameworkMessageTestTrait
- SMS Message object test trait.
Namespace
Drupal\Tests\sms\FunctionalCode
public function testOptionsRemove() {
$options = [
'foo' => $this
->randomMachineName(),
'bar' => $this
->randomMachineName(),
];
$sms_message1 = $this
->createSmsMessage();
$sms_message1
->setOption('foo', $options['foo']);
$sms_message1
->setOption('bar', $options['bar']);
$sms_message1
->removeOption('foo');
unset($options['foo']);
$this
->assertEquals($options, $sms_message1
->getOptions());
}