mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-12 09:09:39 +01:00
Merge pull request #544 from bantu/cnelissen-BigIntegerConstantsFix
Refactor defined MATH_BIGINTEGER_ constants into class constants. * bantu/cnelissen-BigIntegerConstantsFix: Add #@+ block for properties used by internal implementation. Move in-code comments to property doc blocks. Refactor defined MATH_BIGINTEGER_ constants into class constants.
This commit is contained in:
commit
c7620a535c
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@ abstract class PhpseclibFunctionalTestCase extends PhpseclibTestCase
|
|||||||
static public function setUpBeforeClass()
|
static public function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
if (extension_loaded('runkit')) {
|
if (extension_loaded('runkit')) {
|
||||||
self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_GMP);
|
self::ensureConstant('MATH_BIGINTEGER_MODE', \phpseclib\Math\BigInteger::MODE_GMP);
|
||||||
self::ensureConstant('CRYPT_HASH_MODE', CRYPT_HASH_MODE_HASH);
|
self::ensureConstant('CRYPT_HASH_MODE', CRYPT_HASH_MODE_HASH);
|
||||||
self::reRequireFile('Math/BigInteger.php');
|
self::reRequireFile('Math/BigInteger.php');
|
||||||
self::reRequireFile('Crypt/Hash.php');
|
self::reRequireFile('Crypt/Hash.php');
|
||||||
|
@ -15,6 +15,6 @@ class Unit_Math_BigInteger_BCMathTest extends Unit_Math_BigInteger_TestCase
|
|||||||
|
|
||||||
parent::setUpBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
|
|
||||||
self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_BCMATH);
|
self::ensureConstant('MATH_BIGINTEGER_MODE', \phpseclib\Math\BigInteger::MODE_BCMATH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,6 @@ class Unit_Math_BigInteger_GMPTest extends Unit_Math_BigInteger_TestCase
|
|||||||
|
|
||||||
parent::setUpBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
|
|
||||||
self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_GMP);
|
self::ensureConstant('MATH_BIGINTEGER_MODE', \phpseclib\Math\BigInteger::MODE_GMP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,6 @@ class Unit_Math_BigInteger_InternalOpenSSLTest extends Unit_Math_BigInteger_Test
|
|||||||
|
|
||||||
parent::setUpBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
|
|
||||||
self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_INTERNAL);
|
self::ensureConstant('MATH_BIGINTEGER_MODE', \phpseclib\Math\BigInteger::MODE_INTERNAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ class Unit_Math_BigInteger_InternalTest extends Unit_Math_BigInteger_TestCase
|
|||||||
{
|
{
|
||||||
parent::setUpBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
|
|
||||||
self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_INTERNAL);
|
self::ensureConstant('MATH_BIGINTEGER_MODE', \phpseclib\Math\BigInteger::MODE_INTERNAL);
|
||||||
self::ensureConstant('MATH_BIGINTEGER_OPENSSL_DISABLE', true);
|
self::ensureConstant('MATH_BIGINTEGER_OPENSSL_DISABLE', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase
|
|||||||
public function testDiffieHellmanKeyAgreement()
|
public function testDiffieHellmanKeyAgreement()
|
||||||
{
|
{
|
||||||
if (getenv('TRAVIS') && PHP_VERSION === '5.3.3'
|
if (getenv('TRAVIS') && PHP_VERSION === '5.3.3'
|
||||||
&& MATH_BIGINTEGER_MODE === MATH_BIGINTEGER_MODE_INTERNAL
|
&& MATH_BIGINTEGER_MODE === \phpseclib\Math\BigInteger::MODE_INTERNAL
|
||||||
) {
|
) {
|
||||||
$this->markTestIncomplete(
|
$this->markTestIncomplete(
|
||||||
'This test hangs on PHP 5.3.3 using internal mode.'
|
'This test hangs on PHP 5.3.3 using internal mode.'
|
||||||
|
Loading…
Reference in New Issue
Block a user