protected function NeverLoggedBlockTest::checkTestResults in Auto Purge Users 8.3
Check the state of each user.
2 calls to NeverLoggedBlockTest::checkTestResults()
- NeverLoggedBlockTest::checkConfirmFormResults in tests/
src/ Functional/ NeverLoggedBlockTest.php - Verifies the expected results of each test.
- NeverLoggedBlockTest::checkCronResults in tests/
src/ Functional/ NeverLoggedBlockTest.php - Verifies the expected results of each test.
File
- tests/
src/ Functional/ NeverLoggedBlockTest.php, line 63
Class
- NeverLoggedBlockTest
- Purge users who have never logged in for a specific period.
Namespace
Drupal\Tests\purge_users\FunctionalCode
protected function checkTestResults() : void {
// Admin account is not deleted.
$account = $this->userStorage
->load($this->admin
->id());
$this
->assertFalse($account
->isBlocked());
// User is blocked.
$account = $this->userStorage
->load($this->neverLoggedUserToBlock
->id());
$this
->assertTrue($account
->isBlocked());
// Active user is not blocked.
$account = $this->userStorage
->load($this->activeUser
->id());
$this
->assertFalse($account
->isBlocked());
}