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