1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-27 04:34:45 +01:00

[constant-trickery] Also test without OpenSSL.

This commit is contained in:
Andreas Fischer 2013-01-13 19:14:06 +01:00
parent 6d24b92b11
commit 93d7bf4444
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,21 @@
<?php
/**
* @author Andreas Fischer <bantu@phpbb.com>
* @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);
}
}

View File

@ -12,5 +12,6 @@ class Math_BigInteger_InternalTest extends Math_BigInteger_TestCase
parent::setUpBeforeClass(); parent::setUpBeforeClass();
self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_INTERNAL); self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_INTERNAL);
self::ensureConstant('MATH_BIGINTEGER_OPENSSL_DISABLE', true);
} }
} }