You are here

public function SmsFrameworkPhoneNumberVerificationTest::testGetPhoneNumberSettingsForEntityNoSettings in SMS Framework 8

Same name and namespace in other branches
  1. 2.x 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 121

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
    ->setExpectedException(PhoneNumberSettingsException::class);
  $this->phoneNumberVerificationProvider
    ->getPhoneNumberSettingsForEntity($test_entity_random_bundle);
}