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:
parent
6d24b92b11
commit
93d7bf4444
21
tests/Math/BigInteger/InternalOpenSSLTest.php
Normal file
21
tests/Math/BigInteger/InternalOpenSSLTest.php
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user