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\FunctionalCode
public function testStatusProtection() {
$protected_account = $this
->createProtectedUser([
'user_status',
]);
$this
->drupalGet('user/' . $protected_account
->id() . '/edit');
$this
->assertSession()
->fieldNotExists('status');
}