You are here

public function SmsFrameworkVerificationMaintenanceTest::testVerificationVerifiedExpired in SMS Framework 8

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

Test verified verification.

File

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

Class

SmsFrameworkVerificationMaintenanceTest
Tests verification maintenance executed during cron.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testVerificationVerifiedExpired() {
  $this
    ->getLastVerification()
    ->setStatus(TRUE)
    ->set('created', 0)
    ->save();
  $this->container
    ->get('cron')
    ->run();
  $this
    ->assertTrue($this
    ->getLastVerification() instanceof PhoneNumberVerificationInterface);
}