diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-10-10 12:09:50 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-10-10 12:09:50 +0200 |
commit | 7c347864a4388ceac780ef25c4cee680ef80aaf4 (patch) | |
tree | f9de7174cdcfcc6411126b8cc400f57f81b6e278 /tests/passwords | |
parent | fdf9ae7c18146ce58531bc6bbbb1eff5461691d2 (diff) | |
download | forums-7c347864a4388ceac780ef25c4cee680ef80aaf4.tar forums-7c347864a4388ceac780ef25c4cee680ef80aaf4.tar.gz forums-7c347864a4388ceac780ef25c4cee680ef80aaf4.tar.bz2 forums-7c347864a4388ceac780ef25c4cee680ef80aaf4.tar.xz forums-7c347864a4388ceac780ef25c4cee680ef80aaf4.zip |
[feature/passwords] Fix tests for 8th bit characters in bcrypt on PHP < 5.3.7
PHPBB3-11610
Diffstat (limited to 'tests/passwords')
-rw-r--r-- | tests/passwords/manager_test.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/passwords/manager_test.php b/tests/passwords/manager_test.php index 77955bd464..f68ca25a2f 100644 --- a/tests/passwords/manager_test.php +++ b/tests/passwords/manager_test.php @@ -170,7 +170,14 @@ 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')); - $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() |