mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
[constant-trickery] Also skip tests when required extension is missing.
This commit is contained in:
parent
306f0711ed
commit
3c75fa1ad4
@ -9,6 +9,11 @@ class Math_BigInteger_BCMathTest extends Math_BigInteger_TestCase
|
|||||||
{
|
{
|
||||||
static public function setUpBeforeClass()
|
static public function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
|
if (!extension_loaded('bcmath'))
|
||||||
|
{
|
||||||
|
self::markTestSkipped('BCMath extension is not available.');
|
||||||
|
}
|
||||||
|
|
||||||
self::ensureModeConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_BCMATH);
|
self::ensureModeConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_BCMATH);
|
||||||
parent::setUpBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,11 @@ class Math_BigInteger_GMPTest extends Math_BigInteger_TestCase
|
|||||||
{
|
{
|
||||||
static public function setUpBeforeClass()
|
static public function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
|
if (!extension_loaded('gmp'))
|
||||||
|
{
|
||||||
|
self::markTestSkipped('GNU Multiple Precision (GMP) extension is not available.');
|
||||||
|
}
|
||||||
|
|
||||||
self::ensureModeConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_GMP);
|
self::ensureModeConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_GMP);
|
||||||
parent::setUpBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user