You are here

public function SmsFrameworkUserSettingsTest::testAccountRegistrationOff in SMS Framework 2.x

Same name and namespace in other branches
  1. 8 modules/sms_user/tests/src/Functional/SmsFrameworkUserSettingsTest.php \Drupal\Tests\sms_user\Functional\SmsFrameworkUserSettingsTest::testAccountRegistrationOff()
  2. 2.1.x modules/sms_user/tests/src/Functional/SmsFrameworkUserSettingsTest.php \Drupal\Tests\sms_user\Functional\SmsFrameworkUserSettingsTest::testAccountRegistrationOff()

Test account registrations are off.

File

modules/sms_user/tests/src/Functional/SmsFrameworkUserSettingsTest.php, line 127

Class

SmsFrameworkUserSettingsTest
Tests SMS User settings user interface.

Namespace

Drupal\Tests\sms_user\Functional

Code

public function testAccountRegistrationOff() {
  $edit = [
    'account_registration[behaviour]' => 'none',
  ];
  $this
    ->drupalPostForm(Url::fromRoute('sms_user.options'), $edit, 'Save configuration');
  $this
    ->assertRaw('The configuration options have been saved.');
  $settings = $this
    ->config('sms_user.settings')
    ->get('account_registration');
  $this
    ->assertFalse($settings['unrecognized_sender']['status']);
  $this
    ->assertFalse($settings['incoming_pattern']['status']);
}