You are here

public function SmsFrameworkGatewayEntityTest::testGetRetentionDurationInvalidDirection in SMS Framework 2.1.x

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

Tests a bad retention direction.

File

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

Class

SmsFrameworkGatewayEntityTest
Tests SMS Framework gateway entity.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testGetRetentionDurationInvalidDirection() {
  $gateway = $this
    ->createGateway();
  $this
    ->expectException(\InvalidArgumentException::class);
  $this
    ->expectExceptionMessage('0 is not a valid direction.');
  $gateway
    ->getRetentionDuration(0);
}