From 93d7bf4444aa6cb13e8e458cc19486e7d7d551c8 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 13 Jan 2013 19:14:06 +0100 Subject: [PATCH] [constant-trickery] Also test without OpenSSL. --- tests/Math/BigInteger/InternalOpenSSLTest.php | 21 +++++++++++++++++++ tests/Math/BigInteger/InternalTest.php | 1 + 2 files changed, 22 insertions(+) create mode 100644 tests/Math/BigInteger/InternalOpenSSLTest.php diff --git a/tests/Math/BigInteger/InternalOpenSSLTest.php b/tests/Math/BigInteger/InternalOpenSSLTest.php new file mode 100644 index 00000000..f235484d --- /dev/null +++ b/tests/Math/BigInteger/InternalOpenSSLTest.php @@ -0,0 +1,21 @@ + + * @copyright MMXIII Andreas Fischer + * @license http://www.opensource.org/licenses/mit-license.html MIT License + */ + +class Math_BigInteger_InternalOpenSSLTest extends Math_BigInteger_TestCase +{ + static public function setUpBeforeClass() + { + if (!function_exists('openssl_public_encrypt')) + { + self::markTestSkipped('openssl_public_encrypt() function is not available.'); + } + + parent::setUpBeforeClass(); + + self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_INTERNAL); + } +} diff --git a/tests/Math/BigInteger/InternalTest.php b/tests/Math/BigInteger/InternalTest.php index 7b1c100a..7cbbc8f8 100644 --- a/tests/Math/BigInteger/InternalTest.php +++ b/tests/Math/BigInteger/InternalTest.php @@ -12,5 +12,6 @@ class Math_BigInteger_InternalTest extends Math_BigInteger_TestCase parent::setUpBeforeClass(); self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_INTERNAL); + self::ensureConstant('MATH_BIGINTEGER_OPENSSL_DISABLE', true); } }