You are here

protected function BlockedSitePolicyDeleteTest::checkTestResults in Auto Purge Users 8.3

Check the state of each user.

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

File

tests/src/Functional/BlockedSitePolicyDeleteTest.php, line 65

Class

BlockedSitePolicyDeleteTest
Site policy applied.

Namespace

Drupal\Tests\purge_users\Functional

Code

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

  // Blocked user is not deleted.
  $account = $this->userStorage
    ->load($this->blockedUser
    ->id());
  $this
    ->assertNotNull($account);

  // Blocked user is deleted.
  $account = $this->userStorage
    ->load($this->blockedUserToDelete
    ->id());
  $this
    ->assertNull($account);
  $account = $this->userStorage
    ->load($this->activeUser
    ->id());
  $this
    ->assertNotNull($account);
}