summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2015-07-24 15:18:42 +0200
committerAndreas Gohr <andi@splitbrain.org>2015-07-24 15:18:42 +0200
commit32c7ba22db35fd22aed87fb31984069873cefc4f (patch)
tree6daaa82987ff119bb5b36c45e2ffa3cf97282289 /_test
parent2ad45addfac44b12c095303cf7abe488576b0802 (diff)
downloadrpg-32c7ba22db35fd22aed87fb31984069873cefc4f.tar.gz
rpg-32c7ba22db35fd22aed87fb31984069873cefc4f.tar.bz2
skip sha512 tests when it's not available
This makes the entire testsuite run through on HHVM 3.8.0 on phpunit beta-2015-06-18 :-) Note: this does not mean that DokuWiki is fully compatible with HHVM, but it's a good step!
Diffstat (limited to '_test')
-rw-r--r--_test/tests/inc/auth_password.test.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/_test/tests/inc/auth_password.test.php b/_test/tests/inc/auth_password.test.php
index 07b9f5bb2..5067e2ca1 100644
--- a/_test/tests/inc/auth_password.test.php
+++ b/_test/tests/inc/auth_password.test.php
@@ -16,9 +16,16 @@ class auth_password_test extends DokuWikiTest {
'kmd5' => 'a579299436d7969791189acadd86fcb716',
'djangomd5' => 'md5$abcde$d0fdddeda8cd92725d2b54148ac09158',
'djangosha1' => 'sha1$abcde$c8e65a7f0acc9158843048a53dcc5a6bc4d17678',
- 'sha512' => '$6$abcdefgh12345678$J9.zOcgx0lotwZdcz0uulA3IVQMinZvFZVjA5vapRLVAAqtay23XD4xeeUxQ3B4JvDWYFBIxVWW1tOYlHX13k1'
+
);
+ function __construct() {
+ if(defined('CRYPT_SHA512') && CRYPT_SHA512 == 1) {
+ // Check SHA512 only if available in this PHP
+ $this->passes['sha512'] = '$6$abcdefgh12345678$J9.zOcgx0lotwZdcz0uulA3IVQMinZvFZVjA5vapRLVAAqtay23XD4xeeUxQ3B4JvDWYFBIxVWW1tOYlHX13k1';
+ }
+ }
+
function test_cryptPassword(){
foreach($this->passes as $method => $hash){