protected function InactiveDeleteNotificationTest::createTestUser in Auto Purge Users 8.3
Sets user to be deleted and add email for notification.
Overrides SettingsBase::createTestUser
1 call to InactiveDeleteNotificationTest::createTestUser()
- InactiveDeleteNotificationTest::setUp in tests/
src/ Functional/ InactiveDeleteNotificationTest.php
File
- tests/
src/ Functional/ InactiveDeleteNotificationTest.php, line 88
Class
- InactiveDeleteNotificationTest
- Purge users whose account has not been activated for a specific period.
Namespace
Drupal\Tests\purge_users\FunctionalCode
protected function createTestUser() : void {
// The user is created 2 years ago, never logged in, status = 0.
// Expected to be deleted.
$this->blockedUserToDelete = $this
->createUser([], NULL, FALSE, [
'mail' => 'testemail@test.test',
'created' => strtotime('-2 year'),
'login' => 0,
]);
$this->blockedUserToDelete->status = 0;
$this->blockedUserToDelete
->save();
}