public function SmsFrameworkGatewayEntityTest::testPushIncomingPath in SMS Framework 8
Same name and namespace in other branches
- 2.x tests/src/Kernel/SmsFrameworkGatewayEntityTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkGatewayEntityTest::testPushIncomingPath()
- 2.1.x tests/src/Kernel/SmsFrameworkGatewayEntityTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkGatewayEntityTest::testPushIncomingPath()
Tests incoming message path.
File
- tests/
src/ Kernel/ SmsFrameworkGatewayEntityTest.php, line 73
Class
- SmsFrameworkGatewayEntityTest
- Tests SMS Framework gateway entity.
Namespace
Drupal\Tests\sms\KernelCode
public function testPushIncomingPath() {
$gateway = $this
->createGateway([
'plugin' => 'incoming',
]);
$path = $gateway
->getPushIncomingPath();
$this
->assertTrue(strpos($path, '/sms/incoming/receive/') === 0);
$new_path = '/' . $this
->randomMachineName();
$return = $gateway
->setPushIncomingPath($new_path);
$this
->assertTrue($return instanceof SmsGatewayInterface);
$this
->assertEquals($new_path, $gateway
->getPushIncomingPath());
}