You are here

public function SmsFrameworkMessageEntityTest::testProcessedTime in SMS Framework 8

Same name and namespace in other branches
  1. 2.x tests/src/Kernel/SmsFrameworkMessageEntityTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkMessageEntityTest::testProcessedTime()
  2. 2.1.x tests/src/Kernel/SmsFrameworkMessageEntityTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkMessageEntityTest::testProcessedTime()

Tests processed time.

@covers ::getProcessedTime @covers ::setProcessedTime

File

tests/src/Kernel/SmsFrameworkMessageEntityTest.php, line 213

Class

SmsFrameworkMessageEntityTest
Tests SMS message entity.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testProcessedTime() {
  $sms_message1 = $this
    ->createSmsMessage();
  $this
    ->assertEquals(NULL, $sms_message1
    ->getProcessedTime());
  $time = (new DrupalDateTime('+7 days'))
    ->format('U');
  $sms_message2 = $this
    ->createSmsMessage();
  $sms_message2
    ->setProcessedTime($time);
  $this
    ->assertEquals($time, $sms_message2
    ->getProcessedTime());
}