You are here

public function SmsFrameworkGatewayEntityTest::testOutgoingRetentionDuration in SMS Framework 8

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

Tests outgoing retention setting.

File

tests/src/Kernel/SmsFrameworkGatewayEntityTest.php, line 51

Class

SmsFrameworkGatewayEntityTest
Tests SMS Framework gateway entity.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testOutgoingRetentionDuration() {
  $gateway = $this
    ->createGateway();

  // Default value.
  $this
    ->assertEquals(0, $gateway
    ->getRetentionDuration(Direction::INCOMING));
  $gateway
    ->setRetentionDuration(Direction::OUTGOING, 999);
  $this
    ->assertEquals(999, $gateway
    ->getRetentionDuration(Direction::OUTGOING));
}