You are here

public function SmsFrameworkDeliveryReportTestTrait::testStatusMessage in SMS Framework 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/SmsFrameworkDeliveryReportTestTrait.php \Drupal\Tests\sms\Functional\SmsFrameworkDeliveryReportTestTrait::testStatusMessage()
  2. 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\Functional

Code

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());
}