protected function MigratePhoneNumberTestTrait::assertVerificationCode in SMS Framework 8
Same name and namespace in other branches
- 2.x tests/src/Kernel/Migrate/MigratePhoneNumberTestTrait.php \Drupal\Tests\sms\Kernel\Migrate\MigratePhoneNumberTestTrait::assertVerificationCode()
- 2.1.x tests/src/Kernel/Migrate/MigratePhoneNumberTestTrait.php \Drupal\Tests\sms\Kernel\Migrate\MigratePhoneNumberTestTrait::assertVerificationCode()
Asserts that the specified number has a pending verification code.
1 call to MigratePhoneNumberTestTrait::assertVerificationCode()
- MigratePhoneNumberTestTrait::testPhoneNumberMigration in tests/
src/ Kernel/ Migrate/ MigratePhoneNumberTestTrait.php - Tests that the users' phone numbers verification status is migrated.
File
- tests/
src/ Kernel/ Migrate/ MigratePhoneNumberTestTrait.php, line 169
Class
- MigratePhoneNumberTestTrait
- This trait executes tests for D6 and D7 SMS Framework migrations.
Namespace
Drupal\Tests\sms\Kernel\MigrateCode
protected function assertVerificationCode($number, $code) {
$verification = $this->container
->get('sms.phone_number.verification')
->getPhoneVerificationByPhoneNumber($number, FALSE);
$verification = reset($verification);
return $this
->assertEquals($code, $verification
->getCode());
}