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