protected function NotLoggedDeleteSkipBlockedTest::createTestUser in Auto Purge Users 8.3
User settings, expected to be deleted.
Overrides SettingsBase::createTestUser
1 call to NotLoggedDeleteSkipBlockedTest::createTestUser()
- NotLoggedDeleteSkipBlockedTest::setUp in tests/
src/ Functional/ NotLoggedDeleteSkipBlockedTest.php
File
- tests/
src/ Functional/ NotLoggedDeleteSkipBlockedTest.php, line 79
Class
- NotLoggedDeleteSkipBlockedTest
- Purge users who did not log in for a specific period.
Namespace
Drupal\Tests\purge_users\FunctionalCode
protected function createTestUser() : void {
// User is created 12 months ago and never logged in.
$this->neverLoggedUser = $this
->createUser([], NULL, FALSE, [
'created' => strtotime('-12 month'),
'login' => 0,
]);
// User is created 20 months ago and last logged in 13 months ago.
// Expected to be deleted.
$this->activeUserToDelete = $this
->createUser([], NULL, FALSE, [
'created' => strtotime('-20 month'),
'login' => strtotime('-13 month'),
]);
// User is created 20 months ago and last logged in 13 months ago.
// Expected to be skipped due to status 0
// (option disregard_blocked_users selected).
$this->blockedUser = $this
->createUser([], NULL, FALSE, [
'created' => strtotime('-20 month'),
'login' => strtotime('-13 month'),
]);
}