mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/passwords] Fix tests for 8th bit characters in bcrypt on PHP < 5.3.7
PHPBB3-11610
This commit is contained in:
parent
fdf9ae7c18
commit
7c347864a4
1 changed files with 8 additions and 1 deletions
|
@ -170,7 +170,14 @@ class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase
|
||||||
public function test_hash_password_8bit_bcrypt()
|
public function test_hash_password_8bit_bcrypt()
|
||||||
{
|
{
|
||||||
$this->assertEquals(false, $this->manager->hash('foobar𝄞', 'passwords.driver.bcrypt'));
|
$this->assertEquals(false, $this->manager->hash('foobar𝄞', 'passwords.driver.bcrypt'));
|
||||||
$this->assertNotEquals(false, $this->manager->hash('foobar𝄞', 'passwords.driver.bcrypt_2y'));
|
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()
|
public function test_combined_hash_data()
|
||||||
|
|
Loading…
Add table
Reference in a new issue