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