From e6abc61f45b3121f545ac05271deac209ecdef11 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 12 Dec 2020 20:39:56 -0600 Subject: [PATCH] rm adding of dupe classes (they break annotations) --- tests/Functional/Net/SCPSSH2UserStoryTest.php | 4 ---- tests/Functional/Net/SFTPLargeFileTest.php | 4 ---- tests/Functional/Net/SFTPStreamTest.php | 4 ---- tests/Functional/Net/SFTPUserStoryTest.php | 4 ---- tests/Functional/Net/SSH2AgentTest.php | 4 ---- tests/Functional/Net/SSH2Test.php | 4 ---- tests/Unit/Crypt/AES/McryptTest.php | 4 ---- tests/Unit/Crypt/AES/OpenSSLTest.php | 4 ---- tests/Unit/Crypt/AES/PurePHPTest.php | 4 ---- tests/Unit/Crypt/BlowfishTest.php | 4 ---- tests/Unit/Crypt/DESTest.php | 4 ---- tests/Unit/Crypt/Hash/MD5Test.php | 4 ---- tests/Unit/Crypt/Hash/SHA256Test.php | 4 ---- tests/Unit/Crypt/Hash/SHA256_96Test.php | 24 ------------------- tests/Unit/Crypt/Hash/SHA512Test.php | 4 ---- tests/Unit/Crypt/Hash/SHA512_96Test.php | 24 ------------------- tests/Unit/Crypt/RC2Test.php | 4 ---- tests/Unit/Crypt/RC4Test.php | 4 ---- tests/Unit/Crypt/RSA/LoadKeyTest.php | 4 ---- tests/Unit/Crypt/RSA/ModeTest.php | 4 ---- tests/Unit/Crypt/RandomTest.php | 4 ---- tests/Unit/Crypt/TripleDESTest.php | 4 ---- tests/Unit/Crypt/TwofishTest.php | 4 ---- tests/Unit/File/ANSITest.php | 4 ---- tests/Unit/File/ASN1Test.php | 4 ---- tests/Unit/File/X509/CSRTest.php | 4 ---- tests/Unit/File/X509/SPKACTest.php | 4 ---- tests/Unit/File/X509/X509Test.php | 4 ---- tests/Unit/Math/BigInteger/BCMathTest.php | 4 ---- tests/Unit/Math/BigInteger/GMPTest.php | 4 ---- .../Math/BigInteger/InternalOpenSSLTest.php | 4 ---- tests/Unit/Math/BigInteger/InternalTest.php | 4 ---- tests/Unit/Net/SFTPStreamUnitTest.php | 4 ---- tests/Unit/Net/SSH1Test.php | 4 ---- tests/Unit/Net/SSH2UnitTest.php | 4 ---- travis/run-phpunit.sh | 6 +++++ 36 files changed, 6 insertions(+), 180 deletions(-) diff --git a/tests/Functional/Net/SCPSSH2UserStoryTest.php b/tests/Functional/Net/SCPSSH2UserStoryTest.php index 3413fa42..4ba69f14 100644 --- a/tests/Functional/Net/SCPSSH2UserStoryTest.php +++ b/tests/Functional/Net/SCPSSH2UserStoryTest.php @@ -86,7 +86,3 @@ class Functional_Net_SCPSSH2UserStoryTest extends PhpseclibFunctionalTestCase ); } } - -class SCPSSH2UserStoryTest extends Functional_Net_SCPSSH2UserStoryTest -{ -} diff --git a/tests/Functional/Net/SFTPLargeFileTest.php b/tests/Functional/Net/SFTPLargeFileTest.php index 2d02ff22..36115d54 100644 --- a/tests/Functional/Net/SFTPLargeFileTest.php +++ b/tests/Functional/Net/SFTPLargeFileTest.php @@ -41,7 +41,3 @@ class Functional_Net_SFTPLargeFileTest extends Functional_Net_SFTPTestCase ); } } - -class SFTPLargeFileTest extends Functional_Net_SFTPLargeFileTest -{ -} diff --git a/tests/Functional/Net/SFTPStreamTest.php b/tests/Functional/Net/SFTPStreamTest.php index fa10be9a..55115603 100644 --- a/tests/Functional/Net/SFTPStreamTest.php +++ b/tests/Functional/Net/SFTPStreamTest.php @@ -46,7 +46,3 @@ class Functional_Net_SFTPStreamTest extends Functional_Net_SFTPTestCase ); } } - -class SFTPStreamTest extends Functional_Net_SFTPStreamTest -{ -} diff --git a/tests/Functional/Net/SFTPUserStoryTest.php b/tests/Functional/Net/SFTPUserStoryTest.php index 0470f475..6787b62f 100644 --- a/tests/Functional/Net/SFTPUserStoryTest.php +++ b/tests/Functional/Net/SFTPUserStoryTest.php @@ -746,7 +746,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 -{ -} diff --git a/tests/Functional/Net/SSH2AgentTest.php b/tests/Functional/Net/SSH2AgentTest.php index 7bee0594..7ba57d5c 100644 --- a/tests/Functional/Net/SSH2AgentTest.php +++ b/tests/Functional/Net/SSH2AgentTest.php @@ -50,7 +50,3 @@ class Functional_Net_SSH2AgentTest extends PhpseclibFunctionalTestCase return $args; } } - -class SSH2AgentTest extends Functional_Net_SSH2AgentTest -{ -} diff --git a/tests/Functional/Net/SSH2Test.php b/tests/Functional/Net/SSH2Test.php index cffb309b..09c9ff04 100644 --- a/tests/Functional/Net/SSH2Test.php +++ b/tests/Functional/Net/SSH2Test.php @@ -170,7 +170,3 @@ class Functional_Net_SSH2Test extends PhpseclibFunctionalTestCase $ssh->read(); } } - -class SSH2Test extends Functional_Net_SSH2Test -{ -} diff --git a/tests/Unit/Crypt/AES/McryptTest.php b/tests/Unit/Crypt/AES/McryptTest.php index 633b1f73..41fa2041 100644 --- a/tests/Unit/Crypt/AES/McryptTest.php +++ b/tests/Unit/Crypt/AES/McryptTest.php @@ -12,7 +12,3 @@ class Unit_Crypt_AES_McryptTest extends Unit_Crypt_AES_TestCase $this->engine = CRYPT_ENGINE_MCRYPT; } } - -class McryptTest extends Unit_Crypt_AES_McryptTest -{ -} diff --git a/tests/Unit/Crypt/AES/OpenSSLTest.php b/tests/Unit/Crypt/AES/OpenSSLTest.php index dc8899ce..ddb5de67 100644 --- a/tests/Unit/Crypt/AES/OpenSSLTest.php +++ b/tests/Unit/Crypt/AES/OpenSSLTest.php @@ -12,7 +12,3 @@ class Unit_Crypt_AES_OpenSSLTest extends Unit_Crypt_AES_TestCase $this->engine = CRYPT_ENGINE_OPENSSL; } } - -class OpenSSLTest extends Unit_Crypt_AES_OpenSSLTest -{ -} diff --git a/tests/Unit/Crypt/AES/PurePHPTest.php b/tests/Unit/Crypt/AES/PurePHPTest.php index 2fe5d2c7..12161a9d 100644 --- a/tests/Unit/Crypt/AES/PurePHPTest.php +++ b/tests/Unit/Crypt/AES/PurePHPTest.php @@ -12,7 +12,3 @@ class Unit_Crypt_AES_PurePHPTest extends Unit_Crypt_AES_TestCase $this->engine = CRYPT_ENGINE_INTERNAL; } } - -class PurePHPTest extends Unit_Crypt_AES_PurePHPTest -{ -} diff --git a/tests/Unit/Crypt/BlowfishTest.php b/tests/Unit/Crypt/BlowfishTest.php index 014ff6a2..87406c13 100644 --- a/tests/Unit/Crypt/BlowfishTest.php +++ b/tests/Unit/Crypt/BlowfishTest.php @@ -128,7 +128,3 @@ class Unit_Crypt_BlowfishTest extends PhpseclibTestCase } } } - -class BlowfishTest extends Unit_Crypt_BlowfishTest -{ -} diff --git a/tests/Unit/Crypt/DESTest.php b/tests/Unit/Crypt/DESTest.php index b568fc2e..2a51d6cf 100644 --- a/tests/Unit/Crypt/DESTest.php +++ b/tests/Unit/Crypt/DESTest.php @@ -75,7 +75,3 @@ class Unit_Crypt_DESTest extends PhpseclibTestCase } } } - -class DESTest extends Unit_Crypt_DESTest -{ -} diff --git a/tests/Unit/Crypt/Hash/MD5Test.php b/tests/Unit/Crypt/Hash/MD5Test.php index 90f2f458..a2969598 100644 --- a/tests/Unit/Crypt/Hash/MD5Test.php +++ b/tests/Unit/Crypt/Hash/MD5Test.php @@ -45,7 +45,3 @@ class Unit_Crypt_Hash_MD5Test extends Unit_Crypt_Hash_TestCase ); } } - -class MD5Test extends Unit_Crypt_Hash_MD5Test -{ -} diff --git a/tests/Unit/Crypt/Hash/SHA256Test.php b/tests/Unit/Crypt/Hash/SHA256Test.php index 488cf558..b4b1995a 100644 --- a/tests/Unit/Crypt/Hash/SHA256Test.php +++ b/tests/Unit/Crypt/Hash/SHA256Test.php @@ -77,7 +77,3 @@ class Unit_Crypt_Hash_SHA256Test extends Unit_Crypt_Hash_TestCase ); } } - -class SHA256Test extends Unit_Crypt_Hash_SHA256Test -{ -} diff --git a/tests/Unit/Crypt/Hash/SHA256_96Test.php b/tests/Unit/Crypt/Hash/SHA256_96Test.php index 564aae94..5e1f1139 100644 --- a/tests/Unit/Crypt/Hash/SHA256_96Test.php +++ b/tests/Unit/Crypt/Hash/SHA256_96Test.php @@ -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 Crypt_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)); - } -} diff --git a/tests/Unit/Crypt/Hash/SHA512Test.php b/tests/Unit/Crypt/Hash/SHA512Test.php index cc1dce4f..0a0e5818 100644 --- a/tests/Unit/Crypt/Hash/SHA512Test.php +++ b/tests/Unit/Crypt/Hash/SHA512Test.php @@ -77,7 +77,3 @@ class Unit_Crypt_Hash_SHA512Test extends Unit_Crypt_Hash_TestCase ); } } - -class SHA512Test extends Unit_Crypt_Hash_SHA512Test -{ -} diff --git a/tests/Unit/Crypt/Hash/SHA512_96Test.php b/tests/Unit/Crypt/Hash/SHA512_96Test.php index caa4d49e..f5cdce88 100644 --- a/tests/Unit/Crypt/Hash/SHA512_96Test.php +++ b/tests/Unit/Crypt/Hash/SHA512_96Test.php @@ -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 Crypt_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)); - } -} diff --git a/tests/Unit/Crypt/RC2Test.php b/tests/Unit/Crypt/RC2Test.php index 043b0605..0ad664bb 100644 --- a/tests/Unit/Crypt/RC2Test.php +++ b/tests/Unit/Crypt/RC2Test.php @@ -125,7 +125,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 -{ -} diff --git a/tests/Unit/Crypt/RC4Test.php b/tests/Unit/Crypt/RC4Test.php index 4a956d31..4ba34e3d 100644 --- a/tests/Unit/Crypt/RC4Test.php +++ b/tests/Unit/Crypt/RC4Test.php @@ -248,7 +248,3 @@ class Unit_Crypt_RC4Test extends PhpseclibTestCase } } } - -class RC4Test extends Unit_Crypt_RC4Test -{ -} diff --git a/tests/Unit/Crypt/RSA/LoadKeyTest.php b/tests/Unit/Crypt/RSA/LoadKeyTest.php index 8d6af28c..18a93619 100644 --- a/tests/Unit/Crypt/RSA/LoadKeyTest.php +++ b/tests/Unit/Crypt/RSA/LoadKeyTest.php @@ -478,7 +478,3 @@ Vyaqr/WTPzxdXJAAAADHJvb3RAdmFncmFudAECAwQFBg== $this->assertTrue($rsa->verify('zzz', $sig)); } } - -class LoadKeyTest extends Unit_Crypt_RSA_LoadKeyTest -{ -} diff --git a/tests/Unit/Crypt/RSA/ModeTest.php b/tests/Unit/Crypt/RSA/ModeTest.php index eea8e0bf..28e91643 100644 --- a/tests/Unit/Crypt/RSA/ModeTest.php +++ b/tests/Unit/Crypt/RSA/ModeTest.php @@ -116,7 +116,3 @@ k12yS6pCS3c+1wZ9cYFVtgfpSL4XpylLe9EnRT2GRVYCqUkR4AUeTuvnAgMBAAE= $this->assertTrue($rsa->verify($payload, $sig)); } } - -class ModeTest extends Unit_Crypt_RSA_ModeTest -{ -} diff --git a/tests/Unit/Crypt/RandomTest.php b/tests/Unit/Crypt/RandomTest.php index 94af2b39..e53efc8d 100644 --- a/tests/Unit/Crypt/RandomTest.php +++ b/tests/Unit/Crypt/RandomTest.php @@ -51,7 +51,3 @@ class Unit_Crypt_RandomTest extends PhpseclibTestCase return array($x); } } - -class RandomTest extends Unit_Crypt_RandomTest -{ -} diff --git a/tests/Unit/Crypt/TripleDESTest.php b/tests/Unit/Crypt/TripleDESTest.php index 8cdd4fa6..c1f09ba1 100644 --- a/tests/Unit/Crypt/TripleDESTest.php +++ b/tests/Unit/Crypt/TripleDESTest.php @@ -186,7 +186,3 @@ class Unit_Crypt_TripleDESTest extends PhpseclibTestCase } } } - -class TripleDESTest extends Unit_Crypt_TripleDESTest -{ -} diff --git a/tests/Unit/Crypt/TwofishTest.php b/tests/Unit/Crypt/TwofishTest.php index 24a83a60..53cfecd8 100644 --- a/tests/Unit/Crypt/TwofishTest.php +++ b/tests/Unit/Crypt/TwofishTest.php @@ -71,7 +71,3 @@ class Unit_Crypt_TwofishTest extends PhpseclibTestCase } } } - -class TwofishTest extends Unit_Crypt_TwofishTest -{ -} diff --git a/tests/Unit/File/ANSITest.php b/tests/Unit/File/ANSITest.php index d64941bc..7fa89d7f 100644 --- a/tests/Unit/File/ANSITest.php +++ b/tests/Unit/File/ANSITest.php @@ -47,7 +47,3 @@ class Unit_File_ANSITest extends PhpseclibTestCase $this->assertSame(str_repeat('z', 80), $lines[22]); } } - -class ANSITest extends Unit_File_ANSITest -{ -} diff --git a/tests/Unit/File/ASN1Test.php b/tests/Unit/File/ASN1Test.php index a28670a8..00ee7c8e 100644 --- a/tests/Unit/File/ASN1Test.php +++ b/tests/Unit/File/ASN1Test.php @@ -393,7 +393,3 @@ class Unit_File_ASN1Test extends PhpseclibTestCase $this->assertIsArray($a); } } - -class ASN1Test extends Unit_File_ASN1Test -{ -} diff --git a/tests/Unit/File/X509/CSRTest.php b/tests/Unit/File/X509/CSRTest.php index 84736641..f57a0e6d 100644 --- a/tests/Unit/File/X509/CSRTest.php +++ b/tests/Unit/File/X509/CSRTest.php @@ -119,7 +119,3 @@ U9VQQSQzY1oZMVX8i1m5WUTLPz2yLJIBQVdXqhMCQBGoiuSoSjafUhV7i1cEGpb88h5NBYZzWXGZ $x509->saveCSR($x509->signCSR('sha256WithRSAEncryption'), FILE_X509_FORMAT_DER); } } - -class CSRTest extends Unit_File_X509_CSRTest -{ -} diff --git a/tests/Unit/File/X509/SPKACTest.php b/tests/Unit/File/X509/SPKACTest.php index 2d7f0eca..1345f45e 100644 --- a/tests/Unit/File/X509/SPKACTest.php +++ b/tests/Unit/File/X509/SPKACTest.php @@ -96,7 +96,3 @@ class Unit_File_X509_SPKACTest extends PhpseclibTestCase ); } } - -class SPKACTest extends Unit_File_X509_SPKACTest -{ -} diff --git a/tests/Unit/File/X509/X509Test.php b/tests/Unit/File/X509/X509Test.php index 2fb49e84..9f5eeba9 100644 --- a/tests/Unit/File/X509/X509Test.php +++ b/tests/Unit/File/X509/X509Test.php @@ -856,7 +856,3 @@ mDaPrsUl15evEah6amsBfpQiWRbKpDLKs1kF $this->assertFalse($r); } } - -class X509Test extends Unit_File_X509_X509Test -{ -} diff --git a/tests/Unit/Math/BigInteger/BCMathTest.php b/tests/Unit/Math/BigInteger/BCMathTest.php index b0305994..109f81d0 100644 --- a/tests/Unit/Math/BigInteger/BCMathTest.php +++ b/tests/Unit/Math/BigInteger/BCMathTest.php @@ -18,7 +18,3 @@ class Unit_Math_BigInteger_BCMathTest extends Unit_Math_BigInteger_TestCase self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_BCMATH); } } - -class BCMathTest extends Unit_Math_BigInteger_BCMathTest -{ -} diff --git a/tests/Unit/Math/BigInteger/GMPTest.php b/tests/Unit/Math/BigInteger/GMPTest.php index 25ad8849..2ec2042f 100644 --- a/tests/Unit/Math/BigInteger/GMPTest.php +++ b/tests/Unit/Math/BigInteger/GMPTest.php @@ -18,7 +18,3 @@ class Unit_Math_BigInteger_GMPTest extends Unit_Math_BigInteger_TestCase self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_GMP); } } - -class GMPTest extends Unit_Math_BigInteger_GMPTest -{ -} diff --git a/tests/Unit/Math/BigInteger/InternalOpenSSLTest.php b/tests/Unit/Math/BigInteger/InternalOpenSSLTest.php index 21533b9c..4b297d9f 100644 --- a/tests/Unit/Math/BigInteger/InternalOpenSSLTest.php +++ b/tests/Unit/Math/BigInteger/InternalOpenSSLTest.php @@ -18,7 +18,3 @@ class Unit_Math_BigInteger_InternalOpenSSLTest extends Unit_Math_BigInteger_Test self::ensureConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_INTERNAL); } } - -class InternalOpenSSLTest extends Unit_Math_BigInteger_InternalOpenSSLTest -{ -} diff --git a/tests/Unit/Math/BigInteger/InternalTest.php b/tests/Unit/Math/BigInteger/InternalTest.php index bbfe8ff0..f1fcae51 100644 --- a/tests/Unit/Math/BigInteger/InternalTest.php +++ b/tests/Unit/Math/BigInteger/InternalTest.php @@ -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 -{ -} diff --git a/tests/Unit/Net/SFTPStreamUnitTest.php b/tests/Unit/Net/SFTPStreamUnitTest.php index fc23ec3d..663db6d9 100644 --- a/tests/Unit/Net/SFTPStreamUnitTest.php +++ b/tests/Unit/Net/SFTPStreamUnitTest.php @@ -31,7 +31,3 @@ class Unit_Net_SFTPStreamUnitTest extends PhpseclibTestCase $this->assertContains($this->protocol, stream_get_wrappers()); } } - -class SFTPStreamUnitTest extends Unit_Net_SFTPStreamUnitTest -{ -} diff --git a/tests/Unit/Net/SSH1Test.php b/tests/Unit/Net/SSH1Test.php index 042cfe96..b0b2aaed 100644 --- a/tests/Unit/Net/SSH1Test.php +++ b/tests/Unit/Net/SSH1Test.php @@ -39,7 +39,3 @@ class Unit_Net_SSH1Test extends PhpseclibTestCase $this->assertEquals($expected, $result); } } - -class SSH1Test extends Unit_Net_SSH1Test -{ -} diff --git a/tests/Unit/Net/SSH2UnitTest.php b/tests/Unit/Net/SSH2UnitTest.php index 924b4bfe..1c8436b9 100644 --- a/tests/Unit/Net/SSH2UnitTest.php +++ b/tests/Unit/Net/SSH2UnitTest.php @@ -117,7 +117,3 @@ class Unit_Net_SSH2UnitTest extends PhpseclibTestCase ->getMock(); } } - -class SSH2UnitTest extends Unit_Net_SSH2UnitTest -{ -} diff --git a/travis/run-phpunit.sh b/travis/run-phpunit.sh index 2b1d90cc..92351bb2 100755 --- a/travis/run-phpunit.sh +++ b/travis/run-phpunit.sh @@ -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" ]