You are here

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

Same name and namespace in other branches
  1. 8 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 106

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);
}