public function SmsFrameworkVerificationMaintenanceTest::testVerificationUnverifiedExpiredPurgeFieldData in SMS Framework 8
Same name and namespace in other branches
- 2.x tests/src/Kernel/SmsFrameworkVerificationMaintenanceTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkVerificationMaintenanceTest::testVerificationUnverifiedExpiredPurgeFieldData()
- 2.1.x tests/src/Kernel/SmsFrameworkVerificationMaintenanceTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkVerificationMaintenanceTest::testVerificationUnverifiedExpiredPurgeFieldData()
Test unverified verification which have expired purge field data.
File
- tests/
src/ Kernel/ SmsFrameworkVerificationMaintenanceTest.php, line 117
Class
- SmsFrameworkVerificationMaintenanceTest
- Tests verification maintenance executed during cron.
Namespace
Drupal\Tests\sms\KernelCode
public function testVerificationUnverifiedExpiredPurgeFieldData() {
$this->phoneNumberSettings
->setPurgeVerificationPhoneNumber(TRUE)
->save();
$this
->getLastVerification()
->setStatus(FALSE)
->set('created', 0)
->save();
$this->container
->get('cron')
->run();
$this->testEntity = EntityTest::load($this->testEntity
->id());
$this
->assertEmpty($this->testEntity->{$this->phoneField
->getName()});
}