function PasswordVerifyTest::testWithinBounds
Same name in other branches
- 11.x core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php \Drupal\Tests\phpass\Unit\PasswordVerifyTest::testWithinBounds()
Tests the hash count boundaries are enforced.
@covers ::enforceLog2Boundaries
File
-
core/
modules/ phpass/ tests/ src/ Unit/ PasswordVerifyTest.php, line 111
Class
- PasswordVerifyTest
- Unit tests for password hashing API.
Namespace
Drupal\Tests\phpass\UnitCode
public function testWithinBounds() : void {
$hasher = new PhpassHashedPasswordLog2BoundariesDouble();
$this->assertEquals(PhpassHashedPassword::MIN_HASH_COUNT, $hasher->enforceLog2Boundaries(1), "Min hash count enforced");
$this->assertEquals(PhpassHashedPassword::MAX_HASH_COUNT, $hasher->enforceLog2Boundaries(100), "Max hash count enforced");
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.