1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-11-30 04:39:21 +01:00

Merge branch '1.0-class-rename' into 2.0-class-rename

This commit is contained in:
terrafrost 2020-12-12 21:41:10 -06:00
commit 0676524dfd
36 changed files with 6 additions and 180 deletions

View File

@ -98,7 +98,3 @@ class Functional_Net_SCPSSH2UserStoryTest extends PhpseclibFunctionalTestCase
);
}
}
class SCPSSH2UserStoryTest extends Functional_Net_SCPSSH2UserStoryTest
{
}

View File

@ -42,7 +42,3 @@ class Functional_Net_SFTPLargeFileTest extends Functional_Net_SFTPTestCase
);
}
}
class SFTPLargeFileTest extends Functional_Net_SFTPLargeFileTest
{
}

View File

@ -51,7 +51,3 @@ class Functional_Net_SFTPStreamTest extends Functional_Net_SFTPTestCase
);
}
}
class SFTPStreamTest extends Functional_Net_SFTPStreamTest
{
}

View File

@ -748,7 +748,3 @@ class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase
$this->assertEquals($list_cache_enabled, $list_cache_disabled, 'The files should be the same regardless of stat cache', 0.0, 10, true);
}
}
class SFTPUserStoryTest extends Functional_Net_SFTPUserStoryTest
{
}

View File

@ -53,7 +53,3 @@ class Functional_Net_SSH2AgentTest extends PhpseclibFunctionalTestCase
return $args;
}
}
class SSH2AgentTest extends Functional_Net_SSH2AgentTest
{
}

View File

@ -172,7 +172,3 @@ class Functional_Net_SSH2Test extends PhpseclibFunctionalTestCase
$ssh->read();
}
}
class SSH2Test extends Functional_Net_SSH2Test
{
}

View File

@ -14,7 +14,3 @@ class Unit_Crypt_AES_McryptTest extends Unit_Crypt_AES_TestCase
$this->engine = Base::ENGINE_MCRYPT;
}
}
class McryptTest extends Unit_Crypt_AES_McryptTest
{
}

View File

@ -14,7 +14,3 @@ class Unit_Crypt_AES_OpenSSLTest extends Unit_Crypt_AES_TestCase
$this->engine = Base::ENGINE_OPENSSL;
}
}
class OpenSSLTest extends Unit_Crypt_AES_OpenSSLTest
{
}

View File

@ -14,7 +14,3 @@ class Unit_Crypt_AES_PurePHPTest extends Unit_Crypt_AES_TestCase
$this->engine = Base::ENGINE_INTERNAL;
}
}
class PurePHPTest extends Unit_Crypt_AES_PurePHPTest
{
}

View File

@ -129,7 +129,3 @@ class Unit_Crypt_BlowfishTest extends PhpseclibTestCase
}
}
}
class BlowfishTest extends Unit_Crypt_BlowfishTest
{
}

View File

@ -76,7 +76,3 @@ class Unit_Crypt_DESTest extends PhpseclibTestCase
}
}
}
class DESTest extends Unit_Crypt_DESTest
{
}

View File

@ -47,7 +47,3 @@ class Unit_Crypt_Hash_MD5Test extends Unit_Crypt_Hash_TestCase
);
}
}
class MD5Test extends Unit_Crypt_Hash_MD5Test
{
}

View File

@ -79,7 +79,3 @@ class Unit_Crypt_Hash_SHA256Test extends Unit_Crypt_Hash_TestCase
);
}
}
class SHA256Test extends Unit_Crypt_Hash_SHA256Test
{
}

View File

@ -30,27 +30,3 @@ class Unit_Crypt_Hash_SHA256_96Test extends Unit_Crypt_Hash_SHA256Test
parent::testHMAC($key, $message, substr($longResult, 0, 24));
}
}
class SHA256_96Test extends SHA256Test
{
public function getInstance()
{
return new Hash('sha256-96');
}
/**
* @dataProvider hashData()
*/
public function testHash($message, $longResult)
{
parent::testHash($message, substr($longResult, 0, 24));
}
/**
* @dataProvider hmacData()
*/
public function testHMAC($key, $message, $longResult)
{
parent::testHMAC($key, $message, substr($longResult, 0, 24));
}
}

View File

@ -79,7 +79,3 @@ class Unit_Crypt_Hash_SHA512Test extends Unit_Crypt_Hash_TestCase
);
}
}
class SHA512Test extends Unit_Crypt_Hash_SHA512Test
{
}

View File

@ -30,27 +30,3 @@ class Unit_Crypt_Hash_SHA512_96Test extends Unit_Crypt_Hash_SHA512Test
parent::testHMAC($key, $message, substr($longResult, 0, 24));
}
}
class SHA512_96Test extends SHA512Test
{
public function getInstance()
{
return new Hash('sha512-96');
}
/**
* @dataProvider hashData()
*/
public function testHash($message, $longResult)
{
parent::testHash($message, substr($longResult, 0, 24));
}
/**
* @dataProvider hmacData()
*/
public function testHMAC($key, $message, $longResult)
{
parent::testHMAC($key, $message, substr($longResult, 0, 24));
}
}

View File

@ -126,7 +126,3 @@ class Unit_Crypt_RC2Test extends PhpseclibTestCase
$this->assertEquals($result, $plaintext, "Failed asserting that decrypted result yielded $plaintext as a result in $engineName engine");
}
}
class RC2Test extends Unit_Crypt_RC2Test
{
}

View File

@ -250,7 +250,3 @@ class Unit_Crypt_RC4Test extends PhpseclibTestCase
}
}
}
class RC4Test extends Unit_Crypt_RC4Test
{
}

View File

@ -479,7 +479,3 @@ Vyaqr/WTPzxdXJAAAADHJvb3RAdmFncmFudAECAwQFBg==
$this->assertTrue($rsa->verify('zzz', $sig));
}
}
class LoadKeyTest extends Unit_Crypt_RSA_LoadKeyTest
{
}

View File

@ -116,7 +116,3 @@ k12yS6pCS3c+1wZ9cYFVtgfpSL4XpylLe9EnRT2GRVYCqUkR4AUeTuvnAgMBAAE=
$this->assertTrue($rsa->verify($payload, $sig));
}
}
class ModeTest extends Unit_Crypt_RSA_ModeTest
{
}

View File

@ -53,7 +53,3 @@ class Unit_Crypt_RandomTest extends PhpseclibTestCase
return array($x);
}
}
class RandomTest extends Unit_Crypt_RandomTest
{
}

View File

@ -198,7 +198,3 @@ class Unit_Crypt_TripleDESTest extends PhpseclibTestCase
}
}
}
class TripleDESTest extends Unit_Crypt_TripleDESTest
{
}

View File

@ -72,7 +72,3 @@ class Unit_Crypt_TwofishTest extends PhpseclibTestCase
}
}
}
class TwofishTest extends Unit_Crypt_TwofishTest
{
}

View File

@ -47,7 +47,3 @@ class Unit_File_ANSITest extends PhpseclibTestCase
$this->assertSame(str_repeat('z', 80), $lines[22]);
}
}
class ANSITest extends Unit_File_ANSITest
{
}

View File

@ -393,7 +393,3 @@ class Unit_File_ASN1Test extends PhpseclibTestCase
$this->assertIsArray($a);
}
}
class ASN1Test extends Unit_File_ASN1Test
{
}

View File

@ -119,7 +119,3 @@ U9VQQSQzY1oZMVX8i1m5WUTLPz2yLJIBQVdXqhMCQBGoiuSoSjafUhV7i1cEGpb88h5NBYZzWXGZ
$x509->saveCSR($x509->signCSR('sha256WithRSAEncryption'), X509::FORMAT_DER);
}
}
class CSRTest extends Unit_File_X509_CSRTest
{
}

View File

@ -96,7 +96,3 @@ class Unit_File_X509_SPKACTest extends PhpseclibTestCase
);
}
}
class SPKACTest extends Unit_File_X509_SPKACTest
{
}

View File

@ -920,7 +920,3 @@ mDaPrsUl15evEah6amsBfpQiWRbKpDLKs1kF
$this->assertFalse($r);
}
}
class X509Test extends Unit_File_X509_X509Test
{
}

View File

@ -18,7 +18,3 @@ class Unit_Math_BigInteger_BCMathTest extends Unit_Math_BigInteger_TestCase
self::ensureConstant('MATH_BIGINTEGER_MODE', \phpseclib\Math\BigInteger::MODE_BCMATH);
}
}
class BCMathTest extends Unit_Math_BigInteger_BCMathTest
{
}

View File

@ -18,7 +18,3 @@ class Unit_Math_BigInteger_GMPTest extends Unit_Math_BigInteger_TestCase
self::ensureConstant('MATH_BIGINTEGER_MODE', \phpseclib\Math\BigInteger::MODE_GMP);
}
}
class GMPTest extends Unit_Math_BigInteger_GMPTest
{
}

View File

@ -18,7 +18,3 @@ class Unit_Math_BigInteger_InternalOpenSSLTest extends Unit_Math_BigInteger_Test
self::ensureConstant('MATH_BIGINTEGER_MODE', \phpseclib\Math\BigInteger::MODE_INTERNAL);
}
}
class InternalOpenSSLTest extends Unit_Math_BigInteger_InternalOpenSSLTest
{
}

View File

@ -22,7 +22,3 @@ class Unit_Math_BigInteger_InternalTest extends Unit_Math_BigInteger_TestCase
$this->assertSame($x->value, $y->value);
}
}
class InternalTest extends Unit_Math_BigInteger_InternalTest
{
}

View File

@ -24,7 +24,3 @@ class Unit_Net_SFTPStreamUnitTest extends PhpseclibTestCase
$this->assertTrue(stream_wrapper_unregister($protocol));
}
}
class SFTPStreamUnitTest extends Unit_Net_SFTPStreamUnitTest
{
}

View File

@ -39,7 +39,3 @@ class Unit_Net_SSH1Test extends PhpseclibTestCase
$this->assertEquals($expected, $result);
}
}
class SSH1Test extends Unit_Net_SSH1Test
{
}

View File

@ -121,7 +121,3 @@ class Unit_Net_SSH2UnitTest extends PhpseclibTestCase
->getMock();
}
}
class SSH2UnitTest extends Unit_Net_SSH2UnitTest
{
}

View File

@ -29,6 +29,12 @@ then
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertIsString([^)]*)\)/\1: void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertStringContainsString([^)]*)\)/\1: void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertStringNotContainsString([^)]*)\)/\1: void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_Crypt_\(AES\|Hash\|RSA\)_/class /g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_File_\(X509\)_/class /g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_Math_\(BigInteger\)_/class /g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_\(Crypt\|File\|Math\|Net\)_/class /g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Functional_Net_/class /g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/extends Unit_Crypt_Hash_\(SHA512Test\|SHA256Test\)/extends \1/g'
fi
if [ "$TRAVIS_PHP_VERSION" = 'hhvm' -o `php -r "echo (int) version_compare(PHP_VERSION, '7.0', '>=');"` = "1" ]