You are here

public function SmsFrameworkVerificationMaintenanceTest::testVerificationUnverifiedExpiredNoPurgeFieldData in SMS Framework 8

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

Test unverified verification which have expired do not purge field data.

File

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

Class

SmsFrameworkVerificationMaintenanceTest
Tests verification maintenance executed during cron.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testVerificationUnverifiedExpiredNoPurgeFieldData() {
  $this
    ->getLastVerification()
    ->setStatus(FALSE)
    ->set('created', 0)
    ->save();
  $this->container
    ->get('cron')
    ->run();
  $this->testEntity = EntityTest::load($this->testEntity
    ->id());
  $this
    ->assertNotEmpty($this->testEntity->{$this->phoneField
    ->getName()});
}