You are here

public function SmsFrameworkGatewayEntityTest::testPushReportPath in SMS Framework 8

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

Tests incoming report path.

File

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

Class

SmsFrameworkGatewayEntityTest
Tests SMS Framework gateway entity.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testPushReportPath() {
  $gateway = $this
    ->createGateway();
  $path = $gateway
    ->getPushReportPath();
  $this
    ->assertTrue(strpos($path, '/sms/delivery-report/receive/') === 0);
  $new_path = '/' . $this
    ->randomMachineName();
  $return = $gateway
    ->setPushReportPath($new_path);
  $this
    ->assertTrue($return instanceof SmsGatewayInterface);
  $this
    ->assertEquals($new_path, $gateway
    ->getPushReportPath());
}