You are here

public function SmsFrameworkVerificationMaintenanceTest::testVerificationUnverifiedNotExpired in SMS Framework 8

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

Test unverified verification which have not expired.

File

tests/src/Kernel/SmsFrameworkVerificationMaintenanceTest.php, line 81

Class

SmsFrameworkVerificationMaintenanceTest
Tests verification maintenance executed during cron.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testVerificationUnverifiedNotExpired() {
  $this
    ->getLastVerification()
    ->setStatus(FALSE)
    ->save();
  $this->container
    ->get('cron')
    ->run();
  $this
    ->assertTrue($this
    ->getLastVerification() instanceof PhoneNumberVerificationInterface);
}