Fix tests to account for argon2id support

This commit is contained in:
Kijin Sung 2023-04-24 01:13:47 +09:00
parent 0b8133f8e7
commit 5eab0474e5
2 changed files with 2 additions and 2 deletions

View file

@ -110,7 +110,7 @@ class Password
$algos = self::getSupportedAlgorithms();
if (isset($algos['argon2id']))
{
array_unshift($algos);
unset($algos['argon2id']);
}
return key($algos);
}

View file

@ -30,7 +30,7 @@ class PasswordTest extends \Codeception\TestCase\Test
public function testGetDefaultAlgorithm()
{
$algo = Rhymix\Framework\Password::getDefaultAlgorithm();
$this->assertTrue($algo === 'bcrypt' || $algo === 'pbkdf2' || $algo === 'md5');
$this->assertTrue($algo === 'argon2id' || $algo === 'bcrypt' || $algo === 'pbkdf2' || $algo === 'md5');
}
public function testGetWorkFactor()