You are here

public function SmsFrameworkPhoneNumberVerificationTest::testGetPhoneNumberSettingsForEntityNoSettings in SMS Framework 2.x

Same name and namespace in other branches
  1. 8 tests/src/Kernel/SmsFrameworkPhoneNumberVerificationTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkPhoneNumberVerificationTest::testGetPhoneNumberSettingsForEntityNoSettings()
  2. 2.1.x tests/src/Kernel/SmsFrameworkPhoneNumberVerificationTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkPhoneNumberVerificationTest::testGetPhoneNumberSettingsForEntityNoSettings()

Tests read only phone number config helper via entity with no settings..

@covers ::getPhoneNumberSettingsForEntity

File

tests/src/Kernel/SmsFrameworkPhoneNumberVerificationTest.php, line 122

Class

SmsFrameworkPhoneNumberVerificationTest
Tests Phone Number Provider.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testGetPhoneNumberSettingsForEntityNoSettings() {
  $test_entity_random_bundle = EntityTest::create([
    'name' => $this
      ->randomMachineName(),
    'type' => $this
      ->randomMachineName(),
  ]);
  $this
    ->expectException(PhoneNumberSettingsException::class);
  $this->phoneNumberVerificationProvider
    ->getPhoneNumberSettingsForEntity($test_entity_random_bundle);
}