function PasswordRequirementsDefaultTest::testRequirementsWithDefaults

Tests that password hashing generates an info requirement by default.

File

core/tests/Drupal/KernelTests/Core/Password/PasswordRequirementsDefaultTest.php, line 29

Class

PasswordRequirementsDefaultTest
Tests Password System Requirements.

Namespace

Drupal\KernelTests\Core\Password

Code

public function testRequirementsWithDefaults() : void {
  $requirements = $this->checkSystemRequirements();
  $this->assertArrayHasKey('password_hashing', $requirements);
  $this->assertSame(RequirementSeverity::Info, $requirements['password_hashing']['severity']);
  $this->assertEquals('Passwords are hashed with the <em class="placeholder">argon2id</em> algorithm.', (string) $requirements['password_hashing']['value']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.