mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
better test coverage - make sure pacrypt() respects php_crypt:MD5 and makes something like $1$.....
This commit is contained in:
parent
a5ec516adc
commit
605a019a24
@ -110,9 +110,18 @@ class PaCryptTest extends \PHPUnit\Framework\TestCase
|
||||
|
||||
public function testPhpCryptMd5()
|
||||
{
|
||||
global $CONF;
|
||||
|
||||
$config = Config::getInstance();
|
||||
Config::write('encrypt', 'php_crypt:MD5');
|
||||
$CONF['encrypt'] = 'php_crypt:MD5';
|
||||
|
||||
$new = _pacrypt_php_crypt('foo', '');
|
||||
$pac = pacrypt('foo', '');
|
||||
|
||||
$this->assertEquals(1, preg_match('!^\$1\$!', $new), $new);
|
||||
|
||||
$this->assertEquals(1, preg_match('!^\$1\$!', $pac), $pac);
|
||||
|
||||
$CONF = Config::getInstance()->getAll();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user