You are here

public function SmsFrameworkVerificationMaintenanceTest::testVerificationUnverifiedExpired in SMS Framework 8

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

Test unverified verification which have expired are deleted.

File

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

Class

SmsFrameworkVerificationMaintenanceTest
Tests verification maintenance executed during cron.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testVerificationUnverifiedExpired() {
  $this
    ->getLastVerification()
    ->setStatus(FALSE)
    ->set('created', 0)
    ->save();
  $this->container
    ->get('cron')
    ->run();
  $this
    ->assertFalse($this
    ->getLastVerification());
}