Unit tests fixes.

A PHPDoc fix
This commit is contained in:
Sokolovskyy Roman 2017-09-14 09:42:12 +02:00
parent 508f04fab8
commit c6020a4c42
3 changed files with 4 additions and 11 deletions

View File

@ -2288,7 +2288,7 @@ class X509
*
* @param string $date in format date('D, d M Y H:i:s O')
* @access private
* @return array
* @return array|Element
*/
private function timeField($date)
{
@ -3432,7 +3432,7 @@ class X509
}
return false;
default: // Should be a key object (i.e.: \phpseclib\Crypt\RSA).
$key = $key->getPublicKey('PKCS1');
$key = $key->getPublicKey();
break;
}

View File

@ -78,14 +78,7 @@ class Unit_Crypt_BlowfishTest extends PhpseclibTestCase
$bf->setKey($key);
$bf->setIV(str_repeat("\0", $bf->getBlockLength() >> 3));
$engines = array(
'PHP'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_INTERNAL,
'Eval'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_EVAL,
'mcrypt'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_MCRYPT,
'OpenSSL'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_OPENSSL,
);
if (!$bf->isValidEngine($engines[$engine])) {
if (!$bf->isValidEngine($engine)) {
self::markTestSkipped("Unable to initialize $engine engine");
}
$bf->setPreferredEngine($engine);

View File

@ -29,7 +29,7 @@ class Unit_Crypt_TwofishTest extends PhpseclibTestCase
$key = pack('H*', '00000000000000000000000000000000');
$tf->setKey($key);
if (!$tf->isValidEngine($engine)) {
self::markTestSkipped('Unable to initialize $engine engine');
self::markTestSkipped("Unable to initialize $engine engine");
}
$plaintext = pack('H*', '00000000000000000000000000000000');