public function SmsFrameworkUserSettingsTest::testFormUserPhoneNumberSettings in SMS Framework 8
Same name and namespace in other branches
- 2.x modules/sms_user/tests/src/Functional/SmsFrameworkUserSettingsTest.php \Drupal\Tests\sms_user\Functional\SmsFrameworkUserSettingsTest::testFormUserPhoneNumberSettings()
- 2.1.x modules/sms_user/tests/src/Functional/SmsFrameworkUserSettingsTest.php \Drupal\Tests\sms_user\Functional\SmsFrameworkUserSettingsTest::testFormUserPhoneNumberSettings()
Test form state when phone number settings exist for user entity type.
Tests notice is not displayed and form elements are not disabled.
File
- modules/
sms_user/ tests/ src/ Functional/ SmsFrameworkUserSettingsTest.php, line 292
Class
- SmsFrameworkUserSettingsTest
- Tests SMS User settings user interface.
Namespace
Drupal\Tests\sms_user\FunctionalCode
public function testFormUserPhoneNumberSettings() {
$this
->createPhoneNumberSettings('user', 'user');
$this
->drupalGet(Url::fromRoute('sms_user.options'));
$this
->assertNoRaw('There are no phone number settings configured for the user entity type. Some features cannot operate without these settings.', 'Warning message displayed for no phone number settings.');
$input = $this
->xpath('//input[@name="account_registration[behaviour]" and @disabled="disabled" and @value="all"]');
$this
->assertTrue(count($input) === 0, "The 'All unrecognised phone numbers' radio is not disabled.");
$input = $this
->xpath('//input[@name="account_registration[behaviour]" and @disabled="disabled" and @value="incoming_pattern"]');
$this
->assertTrue(count($input) === 0, "The 'incoming_pattern' radio is not disabled.");
}