public function SmsFrameworkUserAccountRegistrationServiceTest::testUnrecognisedGotReply in SMS Framework 2.x
Same name and namespace in other branches
- 8 modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserAccountRegistrationServiceTest::testUnrecognisedGotReply()
- 2.1.x modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserAccountRegistrationServiceTest::testUnrecognisedGotReply()
Ensure reply sent if turned on.
File
- modules/
sms_user/ tests/ src/ Kernel/ SmsFrameworkUserAccountRegistrationServiceTest.php, line 196
Class
- SmsFrameworkUserAccountRegistrationServiceTest
- Tests account registration.
Namespace
Drupal\Tests\sms_user\KernelCode
public function testUnrecognisedGotReply() {
$reply_message = $this
->randomString();
$this
->config('sms_user.settings')
->set('account_registration.unrecognized_sender.status', TRUE)
->set('account_registration.unrecognized_sender.reply.status', TRUE)
->set('account_registration.unrecognized_sender.reply.message', $reply_message)
->save();
$this
->sendIncomingMessage('+123123123', $this
->randomString());
$this
->assertEquals(1, $this
->countUsers(), 'User created');
$this
->assertTrue($this
->inTestMessages($this->gateway, $reply_message));
}