You are here

public function SmsFrameworkPhoneNumberVerificationTest::testGetPhoneNumberSettings in SMS Framework 8

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

Tests read only phone number config helper.

@covers ::getPhoneNumberSettings

File

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

Class

SmsFrameworkPhoneNumberVerificationTest
Tests Phone Number Provider.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testGetPhoneNumberSettings() {
  $return = $this->phoneNumberVerificationProvider
    ->getPhoneNumberSettings($this
    ->randomMachineName(), $this
    ->randomMachineName());
  $this
    ->assertNull($return, 'Phone number settings does not exist.');
  $return = $this->phoneNumberVerificationProvider
    ->getPhoneNumberSettings('entity_test', $this
    ->randomMachineName());
  $this
    ->assertNull($return, 'Phone number settings does not exist.');
  $return = $this->phoneNumberVerificationProvider
    ->getPhoneNumberSettings('entity_test', 'entity_test');
  $this
    ->assertTrue($return instanceof PhoneNumberSettingsInterface);
}