From 8d82f92d183ff1388bad6072d004785afd5bdb87 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 1 Aug 2014 11:01:53 -0500 Subject: [PATCH] Unit tests: changing the mode with runkit causes issues with static vars --- tests/PhpseclibFunctionalTestCase.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/PhpseclibFunctionalTestCase.php b/tests/PhpseclibFunctionalTestCase.php index 42fd80f5..58f5af38 100644 --- a/tests/PhpseclibFunctionalTestCase.php +++ b/tests/PhpseclibFunctionalTestCase.php @@ -7,6 +7,15 @@ abstract class PhpseclibFunctionalTestCase extends PhpseclibTestCase { + static public function setUpBeforeClass() + { + 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