You are here

protected function NotLoggedDeleteSkipBlockedTest::checkTestResults in Auto Purge Users 8.3

Check the state of each user.

2 calls to NotLoggedDeleteSkipBlockedTest::checkTestResults()
NotLoggedDeleteSkipBlockedTest::checkConfirmFormResults in tests/src/Functional/NotLoggedDeleteSkipBlockedTest.php
Verifies the expected results of each test.
NotLoggedDeleteSkipBlockedTest::checkCronResults in tests/src/Functional/NotLoggedDeleteSkipBlockedTest.php
Verifies the expected results of each test.

File

tests/src/Functional/NotLoggedDeleteSkipBlockedTest.php, line 59

Class

NotLoggedDeleteSkipBlockedTest
Purge users who did not log in for a specific period.

Namespace

Drupal\Tests\purge_users\Functional

Code

protected function checkTestResults() : void {
  $account = $this->userStorage
    ->load($this->admin
    ->id());
  $this
    ->assertNotNull($this->admin);

  // Never logged user.
  $account = $this->userStorage
    ->load($this->admin
    ->id());
  $this
    ->assertNotNull($this->neverLoggedUser);

  // Active user to be deleted.
  $account = $this->userStorage
    ->load($this->activeUserToDelete
    ->id());
  $this
    ->assertNull($account);

  // Blocked user.
  $account = $this->userStorage
    ->load($this->admin
    ->id());
  $this
    ->assertNotNull($this->blockedUser);
}