public function NotLoggedDeleteAnonymizeTest::setUp in Auto Purge Users 8.3
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ NotLoggedDeleteAnonymizeTest.php, line 22
Class
- NotLoggedDeleteAnonymizeTest
- Purge users who did not log in for a specific period.
Namespace
Drupal\Tests\purge_users\FunctionalCode
public function setUp() : void {
parent::setUp();
$this->userStorage = $this->container
->get('entity_type.manager')
->getStorage('user');
$this->nodeStorage = $this->container
->get('entity_type.manager')
->getStorage('node');
// Set the users for this scenario.
$this
->addAdminUser();
$this
->createTestUser();
// Set the basic configuration and add the specific changes.
$this
->setBasicConfig();
$this
->config('purge_users.settings')
->set('user_lastlogin_value', '10')
->set('user_lastlogin_period', 'month')
->set('enabled_loggedin_users', TRUE)
->set('purge_user_cancel_method', 'user_cancel_reassign')
->save();
}