From 4af647f170be8e0a0a1b816fe2907f25678ef469 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 1 Jun 2014 21:13:20 +0200 Subject: [PATCH] Split Unit/Functional Test Suites. --- phpunit.xml.dist | 7 +++++-- .../Net/SFTPUserStoryTest.php} | 2 +- .../SSH2FunctionalTest.php => Functional/Net/SSH2Test.php} | 2 +- tests/{ => Unit}/Crypt/AES/ContinuousBufferTest.php | 2 +- tests/{ => Unit}/Crypt/AES/TestCase.php | 2 +- tests/{ => Unit}/Crypt/Hash/MD5Test.php | 2 +- tests/{ => Unit}/Crypt/Hash/TestCase.php | 2 +- tests/{ => Unit}/Crypt/RSA/LoadKeyTest.php | 2 +- tests/{ => Unit}/File/ASN1/DevTest.php | 2 +- tests/{ => Unit}/Math/BigInteger/BCMathTest.php | 2 +- tests/{ => Unit}/Math/BigInteger/GMPTest.php | 2 +- tests/{ => Unit}/Math/BigInteger/InternalOpenSSLTest.php | 2 +- tests/{ => Unit}/Math/BigInteger/InternalTest.php | 2 +- tests/{ => Unit}/Math/BigInteger/TestCase.php | 2 +- tests/{ => Unit}/Net/SSH1Test.php | 2 +- tests/{ => Unit}/Net/SSH2Test.php | 2 +- 16 files changed, 20 insertions(+), 17 deletions(-) rename tests/{Net/SFTPFunctionalTest.php => Functional/Net/SFTPUserStoryTest.php} (99%) rename tests/{Net/SSH2FunctionalTest.php => Functional/Net/SSH2Test.php} (95%) rename tests/{ => Unit}/Crypt/AES/ContinuousBufferTest.php (95%) rename tests/{ => Unit}/Crypt/AES/TestCase.php (91%) rename tests/{ => Unit}/Crypt/Hash/MD5Test.php (95%) rename tests/{ => Unit}/Crypt/Hash/TestCase.php (95%) rename tests/{ => Unit}/Crypt/RSA/LoadKeyTest.php (99%) rename tests/{ => Unit}/File/ASN1/DevTest.php (99%) rename tests/{ => Unit}/Math/BigInteger/BCMathTest.php (86%) rename tests/{ => Unit}/Math/BigInteger/GMPTest.php (87%) rename tests/{ => Unit}/Math/BigInteger/InternalOpenSSLTest.php (85%) rename tests/{ => Unit}/Math/BigInteger/InternalTest.php (89%) rename tests/{ => Unit}/Math/BigInteger/TestCase.php (99%) rename tests/{ => Unit}/Net/SSH1Test.php (96%) rename tests/{ => Unit}/Net/SSH2Test.php (98%) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f579ab4f..09f8b8ff 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -4,8 +4,11 @@ colors="true" > - - ./tests/ + + ./tests/Unit/ + + + ./tests/Functional/ diff --git a/tests/Net/SFTPFunctionalTest.php b/tests/Functional/Net/SFTPUserStoryTest.php similarity index 99% rename from tests/Net/SFTPFunctionalTest.php rename to tests/Functional/Net/SFTPUserStoryTest.php index 9c43b55b..05c316ba 100644 --- a/tests/Net/SFTPFunctionalTest.php +++ b/tests/Functional/Net/SFTPUserStoryTest.php @@ -6,7 +6,7 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -class Net_SFTPFunctionalTest extends PhpseclibFunctionalTestCase +class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase { static protected $scratchDir; static protected $exampleData; diff --git a/tests/Net/SSH2FunctionalTest.php b/tests/Functional/Net/SSH2Test.php similarity index 95% rename from tests/Net/SSH2FunctionalTest.php rename to tests/Functional/Net/SSH2Test.php index 1fd7e271..0f92ca20 100644 --- a/tests/Net/SSH2FunctionalTest.php +++ b/tests/Functional/Net/SSH2Test.php @@ -6,7 +6,7 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -class Net_SSH2FunctionalTest extends PhpseclibFunctionalTestCase +class Functional_Net_SSH2Test extends PhpseclibFunctionalTestCase { public function setUp() { diff --git a/tests/Crypt/AES/ContinuousBufferTest.php b/tests/Unit/Crypt/AES/ContinuousBufferTest.php similarity index 95% rename from tests/Crypt/AES/ContinuousBufferTest.php rename to tests/Unit/Crypt/AES/ContinuousBufferTest.php index 1d712597..e032dab6 100644 --- a/tests/Crypt/AES/ContinuousBufferTest.php +++ b/tests/Unit/Crypt/AES/ContinuousBufferTest.php @@ -5,7 +5,7 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -class Crypt_AES_ContinuousBufferTest extends Crypt_AES_TestCase +class Unit_Crypt_AES_ContinuousBufferTest extends Unit_Crypt_AES_TestCase { // String intented protected $modes = array( diff --git a/tests/Crypt/AES/TestCase.php b/tests/Unit/Crypt/AES/TestCase.php similarity index 91% rename from tests/Crypt/AES/TestCase.php rename to tests/Unit/Crypt/AES/TestCase.php index 317f1e52..c4bf57e6 100644 --- a/tests/Crypt/AES/TestCase.php +++ b/tests/Unit/Crypt/AES/TestCase.php @@ -7,7 +7,7 @@ require_once 'Crypt/AES.php'; -abstract class Crypt_AES_TestCase extends PhpseclibTestCase +abstract class Unit_Crypt_AES_TestCase extends PhpseclibTestCase { static public function setUpBeforeClass() { diff --git a/tests/Crypt/Hash/MD5Test.php b/tests/Unit/Crypt/Hash/MD5Test.php similarity index 95% rename from tests/Crypt/Hash/MD5Test.php rename to tests/Unit/Crypt/Hash/MD5Test.php index 4b0635de..3651147e 100644 --- a/tests/Crypt/Hash/MD5Test.php +++ b/tests/Unit/Crypt/Hash/MD5Test.php @@ -5,7 +5,7 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -class Crypt_Hash_MD5Test extends Crypt_Hash_TestCase +class Unit_Crypt_Hash_MD5Test extends Unit_Crypt_Hash_TestCase { public function getInstance() { diff --git a/tests/Crypt/Hash/TestCase.php b/tests/Unit/Crypt/Hash/TestCase.php similarity index 95% rename from tests/Crypt/Hash/TestCase.php rename to tests/Unit/Crypt/Hash/TestCase.php index 5f469751..040bce2c 100644 --- a/tests/Crypt/Hash/TestCase.php +++ b/tests/Unit/Crypt/Hash/TestCase.php @@ -7,7 +7,7 @@ require_once 'Crypt/Hash.php'; -abstract class Crypt_Hash_TestCase extends PhpseclibTestCase +abstract class Unit_Crypt_Hash_TestCase extends PhpseclibTestCase { static public function setUpBeforeClass() { diff --git a/tests/Crypt/RSA/LoadKeyTest.php b/tests/Unit/Crypt/RSA/LoadKeyTest.php similarity index 99% rename from tests/Crypt/RSA/LoadKeyTest.php rename to tests/Unit/Crypt/RSA/LoadKeyTest.php index 95239d84..da36b0c4 100644 --- a/tests/Crypt/RSA/LoadKeyTest.php +++ b/tests/Unit/Crypt/RSA/LoadKeyTest.php @@ -7,7 +7,7 @@ require_once 'Crypt/RSA.php' ; -class Crypt_RSA_LoadKeyTest extends PhpseclibTestCase +class Unit_Crypt_RSA_LoadKeyTest extends PhpseclibTestCase { public function testBadKey() { diff --git a/tests/File/ASN1/DevTest.php b/tests/Unit/File/ASN1/DevTest.php similarity index 99% rename from tests/File/ASN1/DevTest.php rename to tests/Unit/File/ASN1/DevTest.php index 6b9d9d99..d0d51042 100644 --- a/tests/File/ASN1/DevTest.php +++ b/tests/Unit/File/ASN1/DevTest.php @@ -7,7 +7,7 @@ require_once 'File/ASN1.php'; -class File_ASN1_DevTest extends PhpseclibTestCase +class Unit_File_ASN1_DevTest extends PhpseclibTestCase { /** * on older versions of File_ASN1 this would yield a PHP Warning diff --git a/tests/Math/BigInteger/BCMathTest.php b/tests/Unit/Math/BigInteger/BCMathTest.php similarity index 86% rename from tests/Math/BigInteger/BCMathTest.php rename to tests/Unit/Math/BigInteger/BCMathTest.php index 72c574d1..d856c1a8 100644 --- a/tests/Math/BigInteger/BCMathTest.php +++ b/tests/Unit/Math/BigInteger/BCMathTest.php @@ -5,7 +5,7 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -class Math_BigInteger_BCMathTest extends Math_BigInteger_TestCase +class Unit_Math_BigInteger_BCMathTest extends Unit_Math_BigInteger_TestCase { static public function setUpBeforeClass() { diff --git a/tests/Math/BigInteger/GMPTest.php b/tests/Unit/Math/BigInteger/GMPTest.php similarity index 87% rename from tests/Math/BigInteger/GMPTest.php rename to tests/Unit/Math/BigInteger/GMPTest.php index 27c7a6a4..02a1cae8 100644 --- a/tests/Math/BigInteger/GMPTest.php +++ b/tests/Unit/Math/BigInteger/GMPTest.php @@ -5,7 +5,7 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -class Math_BigInteger_GMPTest extends Math_BigInteger_TestCase +class Unit_Math_BigInteger_GMPTest extends Unit_Math_BigInteger_TestCase { static public function setUpBeforeClass() { diff --git a/tests/Math/BigInteger/InternalOpenSSLTest.php b/tests/Unit/Math/BigInteger/InternalOpenSSLTest.php similarity index 85% rename from tests/Math/BigInteger/InternalOpenSSLTest.php rename to tests/Unit/Math/BigInteger/InternalOpenSSLTest.php index 378caacc..06d57a6f 100644 --- a/tests/Math/BigInteger/InternalOpenSSLTest.php +++ b/tests/Unit/Math/BigInteger/InternalOpenSSLTest.php @@ -5,7 +5,7 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -class Math_BigInteger_InternalOpenSSLTest extends Math_BigInteger_TestCase +class Unit_Math_BigInteger_InternalOpenSSLTest extends Unit_Math_BigInteger_TestCase { static public function setUpBeforeClass() { diff --git a/tests/Math/BigInteger/InternalTest.php b/tests/Unit/Math/BigInteger/InternalTest.php similarity index 89% rename from tests/Math/BigInteger/InternalTest.php rename to tests/Unit/Math/BigInteger/InternalTest.php index 744b2df1..faa9bb79 100644 --- a/tests/Math/BigInteger/InternalTest.php +++ b/tests/Unit/Math/BigInteger/InternalTest.php @@ -5,7 +5,7 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -class Math_BigInteger_InternalTest extends Math_BigInteger_TestCase +class Math_BigInteger_InternalTest extends Unit_Math_BigInteger_TestCase { static public function setUpBeforeClass() { diff --git a/tests/Math/BigInteger/TestCase.php b/tests/Unit/Math/BigInteger/TestCase.php similarity index 99% rename from tests/Math/BigInteger/TestCase.php rename to tests/Unit/Math/BigInteger/TestCase.php index d62dcec5..d233dfb4 100644 --- a/tests/Math/BigInteger/TestCase.php +++ b/tests/Unit/Math/BigInteger/TestCase.php @@ -7,7 +7,7 @@ require_once 'Math/BigInteger.php'; -abstract class Math_BigInteger_TestCase extends PhpseclibTestCase +abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase { static public function setUpBeforeClass() { diff --git a/tests/Net/SSH1Test.php b/tests/Unit/Net/SSH1Test.php similarity index 96% rename from tests/Net/SSH1Test.php rename to tests/Unit/Net/SSH1Test.php index 7c58ceb3..5f4778f3 100644 --- a/tests/Net/SSH1Test.php +++ b/tests/Unit/Net/SSH1Test.php @@ -5,7 +5,7 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -class Net_SSH1Test extends PhpseclibTestCase +class Unit_Net_SSH1Test extends PhpseclibTestCase { public function formatLogDataProvider() { diff --git a/tests/Net/SSH2Test.php b/tests/Unit/Net/SSH2Test.php similarity index 98% rename from tests/Net/SSH2Test.php rename to tests/Unit/Net/SSH2Test.php index 26d6e872..221d6a4f 100644 --- a/tests/Net/SSH2Test.php +++ b/tests/Unit/Net/SSH2Test.php @@ -6,7 +6,7 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -class Net_SSH2Test extends PhpseclibTestCase +class Unit_Net_SSH2Test extends PhpseclibTestCase { public function formatLogDataProvider() {