public function SmsFrameworkMessageEntityTest::testRecipientEntity in SMS Framework 8
Same name and namespace in other branches
- 2.x tests/src/Kernel/SmsFrameworkMessageEntityTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkMessageEntityTest::testRecipientEntity()
- 2.1.x tests/src/Kernel/SmsFrameworkMessageEntityTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkMessageEntityTest::testRecipientEntity()
Tests recipient entity.
@covers ::getRecipientEntity @covers ::setRecipientEntity
File
- tests/
src/ Kernel/ SmsFrameworkMessageEntityTest.php, line 155
Class
- SmsFrameworkMessageEntityTest
- Tests SMS message entity.
Namespace
Drupal\Tests\sms\KernelCode
public function testRecipientEntity() {
$sms_message1 = $this
->createSmsMessage();
$this
->assertEquals(NULL, $sms_message1
->getRecipientEntity());
$sender = EntityTest::create();
$sender
->save();
$sms_message2 = $this
->createSmsMessage();
$sms_message2
->setRecipientEntity($sender);
$this
->assertEquals($sender
->id(), $sms_message2
->getRecipientEntity()
->id());
}