public function SmsFrameworkUserAccountRegistrationServiceTest::testUnrecognisedOffNoCreateUser 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::testUnrecognisedOffNoCreateUser()
- 2.1.x modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserAccountRegistrationServiceTest::testUnrecognisedOffNoCreateUser()
Ensure incoming SMS does not create messages or users.
File
- modules/
sms_user/ tests/ src/ Kernel/ SmsFrameworkUserAccountRegistrationServiceTest.php, line 130
Class
- SmsFrameworkUserAccountRegistrationServiceTest
- Tests account registration.
Namespace
Drupal\Tests\sms_user\KernelCode
public function testUnrecognisedOffNoCreateUser() {
$this
->config('sms_user.settings')
->set('account_registration.unrecognized_sender.status', 0)
->set('account_registration.unrecognized_sender.reply.status', 1)
->save();
$this
->sendIncomingMessage('+123', $this
->randomString());
$this
->assertEquals(0, count($this
->getTestMessages($this->gateway)), 'No messages were created');
$this
->assertEquals(0, $this
->countUsers(), 'No users exist.');
}