You are here

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

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

Tests get verification by code.

@covers ::getPhoneVerificationByCode

File

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

Class

SmsFrameworkPhoneNumberVerificationTest
Tests Phone Number Provider.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testGetPhoneVerificationByCode() {
  $this
    ->createEntityWithPhoneNumber($this->phoneNumberSettings, [
    '+123123123',
  ]);
  $verification = $this
    ->getLastVerification();
  $return = $this->phoneNumberVerificationProvider
    ->getPhoneVerificationByCode($verification
    ->getCode());
  $this
    ->assertEquals($return
    ->id(), $verification
    ->id());
}