You are here

public function UserProtectionTest::testStatusProtection in User protect 8

Tests if the user's status field has the expected protection.

File

tests/src/Functional/UserProtectionTest.php, line 64

Class

UserProtectionTest
Tests each UserProtection plugin in action.

Namespace

Drupal\Tests\userprotect\Functional

Code

public function testStatusProtection() {
  $protected_account = $this
    ->createProtectedUser([
    'user_status',
  ]);
  $this
    ->drupalGet('user/' . $protected_account
    ->id() . '/edit');
  $this
    ->assertSession()
    ->fieldNotExists('status');
}