Merge pull request #443 from terrafrost/runkit-fix

Unit tests: changing the mode with runkit causes issues with static vars

* terrafrost/runkit-fix:
  only use runkit functions if runkit isn't loaded
  Unit tests: changing the mode with runkit causes issues with static vars
This commit is contained in:
Andreas Fischer 2014-08-05 00:10:19 +02:00
commit c52441e7f2

View File

@ -7,6 +7,17 @@
abstract class PhpseclibFunctionalTestCase extends PhpseclibTestCase
{
static public function setUpBeforeClass()
{
if (extension_loaded('runkit')) {
self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_GMP);
self::ensureConstant('CRYPT_HASH_MODE', CRYPT_HASH_MODE_HASH);
self::reRequireFile('Math/BigInteger.php');
self::reRequireFile('Crypt/Hash.php');
}
parent::setUpBeforeClass();
}
/**
* @param string $variable
* @param string|null $message