You are here

protected function MigratePhoneNumberTestTrait::assertNoVerifiedPhoneNumber in SMS Framework 8

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

Asserts that the specified user has no phone number verified or unverified.

1 call to MigratePhoneNumberTestTrait::assertNoVerifiedPhoneNumber()
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 161

Class

MigratePhoneNumberTestTrait
This trait executes tests for D6 and D7 SMS Framework migrations.

Namespace

Drupal\Tests\sms\Kernel\Migrate

Code

protected function assertNoVerifiedPhoneNumber(UserInterface $user) {
  $phone_numbers = $this->container
    ->get('sms.phone_number')
    ->getPhoneNumbers($user);
  return $this
    ->assertEquals([], $phone_numbers, "No phone numbers for user {$user->id()}.");
}