public function SmsFrameworkUserAccountRegistrationServiceTest::testIncomingPatternMultiplePlaceholderSuccess in SMS Framework 2.1.x
Same name and namespace in other branches
- 8 modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserAccountRegistrationServiceTest::testIncomingPatternMultiplePlaceholderSuccess()
- 2.x modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserAccountRegistrationServiceTest::testIncomingPatternMultiplePlaceholderSuccess()
Test if a duplicated placeholder is confirmed.
File
- modules/
sms_user/ tests/ src/ Kernel/ SmsFrameworkUserAccountRegistrationServiceTest.php, line 275
Class
- SmsFrameworkUserAccountRegistrationServiceTest
- Tests account registration.
Namespace
Drupal\Tests\sms_user\KernelCode
public function testIncomingPatternMultiplePlaceholderSuccess() {
$this
->config('sms_user.settings')
->set('account_registration.incoming_pattern.status', 1)
->set('account_registration.incoming_pattern.reply.status', 1)
->set('account_registration.incoming_pattern.incoming_messages.0', "[password] [username] [password]")
->save();
$username = $this
->randomMachineName();
$password = $this
->randomMachineName();
$message = "{$password} {$username} {$password}";
$this
->sendIncomingMessage('+123123123', $message);
}