Skip to content
Snippets Groups Projects
Commit 32c7ba22 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

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!
parent 2ad45add
No related branches found
No related tags found
No related merge requests found
......@@ -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){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment