mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-16 14:46:28 +02:00
[feature/passwords] Fix tests for 8th bit characters in bcrypt on PHP < 5.3.7
PHPBB3-11610
This commit is contained in:
@@ -170,8 +170,15 @@ class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase
|
||||
public function test_hash_password_8bit_bcrypt()
|
||||
{
|
||||
$this->assertEquals(false, $this->manager->hash('foobar𝄞', 'passwords.driver.bcrypt'));
|
||||
if (version_compare(PHP_VERSION, '5.3.7', '<'))
|
||||
{
|
||||
$this->assertEquals(false, $this->manager->hash('foobar𝄞', 'passwords.driver.bcrypt_2y'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->assertNotEquals(false, $this->manager->hash('foobar𝄞', 'passwords.driver.bcrypt_2y'));
|
||||
}
|
||||
}
|
||||
|
||||
public function test_combined_hash_data()
|
||||
{
|
||||
|
Reference in New Issue
Block a user