public function SmsFrameworkDeliveryReportTestTrait::testRecipient in SMS Framework 8
Same name and namespace in other branches
- 2.x tests/src/Functional/SmsFrameworkDeliveryReportTestTrait.php \Drupal\Tests\sms\Functional\SmsFrameworkDeliveryReportTestTrait::testRecipient()
- 2.1.x tests/src/Functional/SmsFrameworkDeliveryReportTestTrait.php \Drupal\Tests\sms\Functional\SmsFrameworkDeliveryReportTestTrait::testRecipient()
Tests recipient.
@covers ::getRecipient @covers ::setRecipient
File
- tests/
src/ Functional/ SmsFrameworkDeliveryReportTestTrait.php, line 35
Class
- SmsFrameworkDeliveryReportTestTrait
- Provides common tests for SmsDeliveryReport object and entity classes.
Namespace
Drupal\Tests\sms\FunctionalCode
public function testRecipient() {
$report = $this
->createDeliveryReport();
$this
->assertEquals('', $report
->getRecipient(), 'Default value is empty string');
$recipient = $this
->getRandomGenerator()
->string();
$return = $report
->setRecipient($recipient);
$this
->assertTrue($return instanceof SmsDeliveryReportInterface);
$this
->assertEquals($recipient, $report
->getRecipient());
}