1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-03 18:18:05 +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:
Andreas Fischer 2014-12-08 19:12:46 +01:00
commit c7620a535c
7 changed files with 372 additions and 353 deletions

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@ abstract class PhpseclibFunctionalTestCase extends PhpseclibTestCase
static public function setUpBeforeClass()
{
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::reRequireFile('Math/BigInteger.php');
self::reRequireFile('Crypt/Hash.php');

View File

@ -15,6 +15,6 @@ class Unit_Math_BigInteger_BCMathTest extends Unit_Math_BigInteger_TestCase
parent::setUpBeforeClass();
self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_BCMATH);
self::ensureConstant('MATH_BIGINTEGER_MODE', \phpseclib\Math\BigInteger::MODE_BCMATH);
}
}

View File

@ -15,6 +15,6 @@ class Unit_Math_BigInteger_GMPTest extends Unit_Math_BigInteger_TestCase
parent::setUpBeforeClass();
self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_GMP);
self::ensureConstant('MATH_BIGINTEGER_MODE', \phpseclib\Math\BigInteger::MODE_GMP);
}
}

View File

@ -15,6 +15,6 @@ class Unit_Math_BigInteger_InternalOpenSSLTest extends Unit_Math_BigInteger_Test
parent::setUpBeforeClass();
self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_INTERNAL);
self::ensureConstant('MATH_BIGINTEGER_MODE', \phpseclib\Math\BigInteger::MODE_INTERNAL);
}
}

View File

@ -11,7 +11,7 @@ class Unit_Math_BigInteger_InternalTest extends Unit_Math_BigInteger_TestCase
{
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);
}

View File

@ -300,7 +300,7 @@ abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase
public function testDiffieHellmanKeyAgreement()
{
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 test hangs on PHP 5.3.3 using internal mode.'