You are here

public function SmsFrameworkDeliveryReportTestTrait::testTimeDelivered in SMS Framework 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/SmsFrameworkDeliveryReportTestTrait.php \Drupal\Tests\sms\Functional\SmsFrameworkDeliveryReportTestTrait::testTimeDelivered()
  2. 2.1.x tests/src/Functional/SmsFrameworkDeliveryReportTestTrait.php \Drupal\Tests\sms\Functional\SmsFrameworkDeliveryReportTestTrait::testTimeDelivered()

Tests time delivered.

@covers ::getTimeDelivered @covers ::setTimeDelivered

File

tests/src/Functional/SmsFrameworkDeliveryReportTestTrait.php, line 120

Class

SmsFrameworkDeliveryReportTestTrait
Provides common tests for SmsDeliveryReport object and entity classes.

Namespace

Drupal\Tests\sms\Functional

Code

public function testTimeDelivered() {
  $report = $this
    ->createDeliveryReport();
  $this
    ->assertNull($report
    ->getTimeDelivered(), 'Default value is NULL');
  $time = 123123123;
  $return = $report
    ->setTimeDelivered($time);
  $this
    ->assertTrue($return instanceof SmsDeliveryReportInterface);
  $this
    ->assertEquals($time, $report
    ->getTimeDelivered());
}