From 55530b055c388056433d4381eb5b24f342b80079 Mon Sep 17 00:00:00 2001 From: Dominique FOURNIER Date: Fri, 7 May 2021 16:55:38 +0200 Subject: [PATCH] Update Tests to supports namespaces --- Tests/{authTest.php => AuthTest.php} | 14 ++++--- ...hhtpasswdTest.php => AuthhtpasswdTest.php} | 2 +- Tests/{authjwtTest.php => AuthjwtTest.php} | 2 +- .../{authsympaTest.php => AuthsympaTest.php} | 2 +- ...uthzgroupsTest.php => AuthzgroupsTest.php} | 2 +- ...groupsooTest.php => AuthzgroupsooTest.php} | 2 +- .../{cachefileTest.php => CachefileTest.php} | 2 +- ...est.php => CertificationauthorityTest.php} | 2 +- Tests/{configTest.php => ConfigTest.php} | 2 +- Tests/{convertTest.php => ConvertTest.php} | 2 +- Tests/{csrfTest.php => CsrfTest.php} | 2 +- Tests/{dbjsonTest.php => DbjsonTest.php} | 2 +- ...{dblayerComplet.php => DblayerComplet.php} | 0 ...upsTest.php => DblayerauthzgroupsTest.php} | 2 +- ...ayerooComplet.php => DblayerooComplet.php} | 0 Tests/{encryptTest.php => EncryptTest.php} | 2 +- Tests/{fileTest.php => FileTest.php} | 2 +- Tests/{ftsTest.php => FtsTest.php} | 2 +- Tests/{getoptsTest.php => GetoptsTest.php} | 2 +- Tests/{httpTest.php => HttpTest.php} | 2 +- Tests/{inifileTest.php => InifileTest.php} | 2 +- ...paddressesTest.php => IpaddressesTest.php} | 2 +- Tests/{jwtTest.php => JwtTest.php} | 2 +- ...addressesTest.php => MacaddressesTest.php} | 2 +- Tests/{mailTest.php => MailTest.php} | 2 +- Tests/{markdownTest.php => MarkdownTest.php} | 2 +- Tests/{outputdlTest.php => OutputdlTest.php} | 2 +- ...{outputhtmlTest.php => OutputhtmlTest.php} | 2 +- ...{outputjsonTest.php => OutputjsonTest.php} | 2 +- Tests/{passwordTest.php => PasswordTest.php} | 2 +- Tests/{queueTest.php => QueueTest.php} | 2 +- .../{queuefileTest.php => QueuefileTest.php} | 2 +- .../{ratelimitTest.php => RatelimitTest.php} | 2 +- ...imitfileTest.php => RatelimitfileTest.php} | 2 +- Tests/{restTest.php => RestTest.php} | 2 +- .../{robotstxtTest.php => RobotstxtTest.php} | 2 +- Tests/{routeTest.php => RouteTest.php} | 2 +- Tests/{rssTest.php => RssTest.php} | 2 +- Tests/{sitemapTest.php => SitemapTest.php} | 2 +- Tests/{spfcheckTest.php => SpfcheckTest.php} | 2 +- Tests/{sseTest.php => SseTest.php} | 2 +- .../{tcpclientTest.php => TcpclientTest.php} | 2 +- Tests/{userssqlTest.php => UserssqlTest.php} | 2 +- Tests/{uuidTest.php => UuidTest.php} | 2 +- Tests/{verifyTest.php => VerifyTest.php} | 2 +- Tests/{xdiffTest.php => XdiffTest.php} | 2 +- ...{xmppclientTest.php => XmppclientTest.php} | 2 +- Tests/autoload.php.dist | 42 +++++++++++++------ src/Version.php | 2 +- 49 files changed, 82 insertions(+), 64 deletions(-) rename Tests/{authTest.php => AuthTest.php} (84%) rename Tests/{authhtpasswdTest.php => AuthhtpasswdTest.php} (96%) rename Tests/{authjwtTest.php => AuthjwtTest.php} (99%) rename Tests/{authsympaTest.php => AuthsympaTest.php} (97%) rename Tests/{authzgroupsTest.php => AuthzgroupsTest.php} (99%) rename Tests/{authzgroupsooTest.php => AuthzgroupsooTest.php} (99%) rename Tests/{cachefileTest.php => CachefileTest.php} (97%) rename Tests/{certificationauthorityTest.php => CertificationauthorityTest.php} (98%) rename Tests/{configTest.php => ConfigTest.php} (99%) rename Tests/{convertTest.php => ConvertTest.php} (98%) rename Tests/{csrfTest.php => CsrfTest.php} (97%) rename Tests/{dbjsonTest.php => DbjsonTest.php} (99%) rename Tests/{dblayerComplet.php => DblayerComplet.php} (100%) rename Tests/{dblayerauthzgroupsTest.php => DblayerauthzgroupsTest.php} (99%) rename Tests/{dblayerooComplet.php => DblayerooComplet.php} (100%) rename Tests/{encryptTest.php => EncryptTest.php} (98%) rename Tests/{fileTest.php => FileTest.php} (99%) rename Tests/{ftsTest.php => FtsTest.php} (99%) rename Tests/{getoptsTest.php => GetoptsTest.php} (99%) rename Tests/{httpTest.php => HttpTest.php} (96%) rename Tests/{inifileTest.php => InifileTest.php} (99%) rename Tests/{ipaddressesTest.php => IpaddressesTest.php} (99%) rename Tests/{jwtTest.php => JwtTest.php} (99%) rename Tests/{macaddressesTest.php => MacaddressesTest.php} (97%) rename Tests/{mailTest.php => MailTest.php} (99%) rename Tests/{markdownTest.php => MarkdownTest.php} (99%) rename Tests/{outputdlTest.php => OutputdlTest.php} (99%) rename Tests/{outputhtmlTest.php => OutputhtmlTest.php} (96%) rename Tests/{outputjsonTest.php => OutputjsonTest.php} (92%) rename Tests/{passwordTest.php => PasswordTest.php} (99%) rename Tests/{queueTest.php => QueueTest.php} (83%) rename Tests/{queuefileTest.php => QueuefileTest.php} (98%) rename Tests/{ratelimitTest.php => RatelimitTest.php} (83%) rename Tests/{ratelimitfileTest.php => RatelimitfileTest.php} (97%) rename Tests/{restTest.php => RestTest.php} (96%) rename Tests/{robotstxtTest.php => RobotstxtTest.php} (99%) rename Tests/{routeTest.php => RouteTest.php} (99%) rename Tests/{rssTest.php => RssTest.php} (98%) rename Tests/{sitemapTest.php => SitemapTest.php} (98%) rename Tests/{spfcheckTest.php => SpfcheckTest.php} (99%) rename Tests/{sseTest.php => SseTest.php} (98%) rename Tests/{tcpclientTest.php => TcpclientTest.php} (97%) rename Tests/{userssqlTest.php => UserssqlTest.php} (98%) rename Tests/{uuidTest.php => UuidTest.php} (90%) rename Tests/{verifyTest.php => VerifyTest.php} (98%) rename Tests/{xdiffTest.php => XdiffTest.php} (99%) rename Tests/{xmppclientTest.php => XmppclientTest.php} (97%) diff --git a/Tests/authTest.php b/Tests/AuthTest.php similarity index 84% rename from Tests/authTest.php rename to Tests/AuthTest.php index 0621cce..85c324c 100644 --- a/Tests/authTest.php +++ b/Tests/AuthTest.php @@ -7,26 +7,28 @@ namespace Domframework\Tests; +use Domframework\Auth; + /** Test the authentication */ -class authTest extends PHPUnit_Framework_TestCase +class AuthTest extends \PHPUnit_Framework_TestCase { public function test_page_1 () { - $auth = new auth (); + $auth = new Auth (); $res = $auth->pageHTML ("http://localhost"); $this->assertSame (!! strpos ($res, "
pageHTML ("http://localhost", "MESSAGE"); $this->assertSame (!! strpos ($res, "MESSAGE"), true); } public function test_URL_1 () { - $auth = new auth (); + $auth = new Auth (); $res = $auth->pageHTML ("http://localhost", "MESSAGE", "URL/TEST"); $this->assertSame (!! strpos ($res, "URL/TEST"), true); } @@ -34,7 +36,7 @@ class authTest extends PHPUnit_Framework_TestCase public function test_alreadyAuth_1 () { // Not Authenticated - $auth = new auth (); + $auth = new Auth (); $res = $auth->pageHTML ("http://localhost", "MESSAGE", "URL/TEST", false); $this->assertSame (!! strpos ($res, "Please sign in"), true); } @@ -42,7 +44,7 @@ class authTest extends PHPUnit_Framework_TestCase public function test_alreadyAuth_2 () { // Authenticated - $auth = new auth (); + $auth = new Auth (); $res = $auth->pageHTML ("http://localhost", "", "", "AUTHENTICATED USER"); $this->assertSame (!! strpos ($res, "AUTHENTICATED USER"), true); } diff --git a/Tests/authhtpasswdTest.php b/Tests/AuthhtpasswdTest.php similarity index 96% rename from Tests/authhtpasswdTest.php rename to Tests/AuthhtpasswdTest.php index 53dae2c..5523541 100644 --- a/Tests/authhtpasswdTest.php +++ b/Tests/AuthhtpasswdTest.php @@ -8,7 +8,7 @@ namespace Domframework\Tests; /** Test the authhtpasswd.php file */ -class authhtpasswdTest extends PHPUnit_Framework_TestCase +class authhtpasswdTest extends \PHPUnit_Framework_TestCase { public function test_clean () { diff --git a/Tests/authjwtTest.php b/Tests/AuthjwtTest.php similarity index 99% rename from Tests/authjwtTest.php rename to Tests/AuthjwtTest.php index e1b6e81..0484ec9 100644 --- a/Tests/authjwtTest.php +++ b/Tests/AuthjwtTest.php @@ -8,7 +8,7 @@ namespace Domframework\Tests; /** Test the authjwt.php file */ -class authjwtTest extends PHPUnit_Framework_TestCase +class authjwtTest extends \PHPUnit_Framework_TestCase { public function __construct () { diff --git a/Tests/authsympaTest.php b/Tests/AuthsympaTest.php similarity index 97% rename from Tests/authsympaTest.php rename to Tests/AuthsympaTest.php index 0aed09e..3ed035e 100644 --- a/Tests/authsympaTest.php +++ b/Tests/AuthsympaTest.php @@ -8,7 +8,7 @@ namespace Domframework\Tests; /** Test the authentication on Sympa Service */ -class authsympaTest extends PHPUnit_Framework_TestCase +class authsympaTest extends \PHPUnit_Framework_TestCase { public function test_connect_1 () { diff --git a/Tests/authzgroupsTest.php b/Tests/AuthzgroupsTest.php similarity index 99% rename from Tests/authzgroupsTest.php rename to Tests/AuthzgroupsTest.php index 357d254..dfa73d7 100644 --- a/Tests/authzgroupsTest.php +++ b/Tests/AuthzgroupsTest.php @@ -8,7 +8,7 @@ namespace Domframework\Tests; /** Test the authzgroups.php file */ -class authzgroupsTest extends PHPUnit_Framework_TestCase +class authzgroupsTest extends \PHPUnit_Framework_TestCase { private $dbconfig = array ( "dsn" => "sqlite:/tmp/databaseAuthzGroups.db", diff --git a/Tests/authzgroupsooTest.php b/Tests/AuthzgroupsooTest.php similarity index 99% rename from Tests/authzgroupsooTest.php rename to Tests/AuthzgroupsooTest.php index e7c8acf..f4af458 100644 --- a/Tests/authzgroupsooTest.php +++ b/Tests/AuthzgroupsooTest.php @@ -8,7 +8,7 @@ namespace Domframework\Tests; /** Test the authzgroupsoo.php file */ -class authzgroupsooTest extends PHPUnit_Framework_TestCase +class authzgroupsooTest extends \PHPUnit_Framework_TestCase { private $dbconfig = array ( "dsn" => "sqlite:/tmp/databaseAuthzGroupsoo.db", diff --git a/Tests/cachefileTest.php b/Tests/CachefileTest.php similarity index 97% rename from Tests/cachefileTest.php rename to Tests/CachefileTest.php index d3647ea..8976fb9 100644 --- a/Tests/cachefileTest.php +++ b/Tests/CachefileTest.php @@ -8,7 +8,7 @@ namespace Domframework\Tests; /** Test the cache.php file */ -class cachefileTest extends PHPUnit_Framework_TestCase +class cachefileTest extends \PHPUnit_Framework_TestCase { public function testInit () { diff --git a/Tests/certificationauthorityTest.php b/Tests/CertificationauthorityTest.php similarity index 98% rename from Tests/certificationauthorityTest.php rename to Tests/CertificationauthorityTest.php index b30d781..83f083f 100644 --- a/Tests/certificationauthorityTest.php +++ b/Tests/CertificationauthorityTest.php @@ -9,7 +9,7 @@ namespace Domframework\Tests; /** Test the certification Authority */ -class certificationauthorityTest extends PHPUnit_Framework_TestCase +class certificationauthorityTest extends \PHPUnit_Framework_TestCase { public function test_createCA_1 () { diff --git a/Tests/configTest.php b/Tests/ConfigTest.php similarity index 99% rename from Tests/configTest.php rename to Tests/ConfigTest.php index caa4f87..d626ae1 100644 --- a/Tests/configTest.php +++ b/Tests/ConfigTest.php @@ -8,7 +8,7 @@ namespace Domframework\Tests; /** Test the config.php file */ -class configTest extends PHPUnit_Framework_TestCase +class configTest extends \PHPUnit_Framework_TestCase { public function test_ExternFile () diff --git a/Tests/convertTest.php b/Tests/ConvertTest.php similarity index 98% rename from Tests/convertTest.php rename to Tests/ConvertTest.php index d129189..646a370 100644 --- a/Tests/convertTest.php +++ b/Tests/ConvertTest.php @@ -8,7 +8,7 @@ namespace Domframework\Tests; /** Test the Conversion of format */ -class convertTest extends PHPUnit_Framework_TestCase +class convertTest extends \PHPUnit_Framework_TestCase { public function test_convertDate1 () { diff --git a/Tests/csrfTest.php b/Tests/CsrfTest.php similarity index 97% rename from Tests/csrfTest.php rename to Tests/CsrfTest.php index 44b36de..29b95ae 100644 --- a/Tests/csrfTest.php +++ b/Tests/CsrfTest.php @@ -8,7 +8,7 @@ namespace Domframework\Tests; /** Test the csrf.php file */ -class csrfTest extends PHPUnit_Framework_TestCase +class csrfTest extends \PHPUnit_Framework_TestCase { public function test_csrf1 () { diff --git a/Tests/dbjsonTest.php b/Tests/DbjsonTest.php similarity index 99% rename from Tests/dbjsonTest.php rename to Tests/DbjsonTest.php index 10b54e5..b73d5f6 100644 --- a/Tests/dbjsonTest.php +++ b/Tests/DbjsonTest.php @@ -8,7 +8,7 @@ namespace Domframework\Tests; /** Test the dbjson database */ -class dbjsonTest extends PHPUnit_Framework_TestCase +class dbjsonTest extends \PHPUnit_Framework_TestCase { public function test_insertOne1 () { diff --git a/Tests/dblayerComplet.php b/Tests/DblayerComplet.php similarity index 100% rename from Tests/dblayerComplet.php rename to Tests/DblayerComplet.php diff --git a/Tests/dblayerauthzgroupsTest.php b/Tests/DblayerauthzgroupsTest.php similarity index 99% rename from Tests/dblayerauthzgroupsTest.php rename to Tests/DblayerauthzgroupsTest.php index 5e94aaf..6f806c7 100644 --- a/Tests/dblayerauthzgroupsTest.php +++ b/Tests/DblayerauthzgroupsTest.php @@ -7,7 +7,7 @@ namespace Domframework\Tests; -class dblayerauthzgroupsTest extends PHPUnit_Framework_TestCase +class dblayerauthzgroupsTest extends \PHPUnit_Framework_TestCase { public $confs = array ( "sqlite" => array ( diff --git a/Tests/dblayerooComplet.php b/Tests/DblayerooComplet.php similarity index 100% rename from Tests/dblayerooComplet.php rename to Tests/DblayerooComplet.php diff --git a/Tests/encryptTest.php b/Tests/EncryptTest.php similarity index 98% rename from Tests/encryptTest.php rename to Tests/EncryptTest.php index 25cd1fe..bed7c33 100644 --- a/Tests/encryptTest.php +++ b/Tests/EncryptTest.php @@ -5,7 +5,7 @@ */ /** Test the encrypt.php file */ -class encryptTest extends PHPUnit_Framework_TestCase +class encryptTest extends \PHPUnit_Framework_TestCase { /** Check the length of the otken with cipher */ diff --git a/Tests/fileTest.php b/Tests/FileTest.php similarity index 99% rename from Tests/fileTest.php rename to Tests/FileTest.php index e8ddb23..5d7d5ae 100644 --- a/Tests/fileTest.php +++ b/Tests/FileTest.php @@ -4,7 +4,7 @@ @author Dominique Fournier */ /** Test the domframework file part */ -class fileTest extends PHPUnit_Framework_TestCase +class fileTest extends \PHPUnit_Framework_TestCase { public function testinit () { diff --git a/Tests/ftsTest.php b/Tests/FtsTest.php similarity index 99% rename from Tests/ftsTest.php rename to Tests/FtsTest.php index 2d382f2..beb9fb1 100644 --- a/Tests/ftsTest.php +++ b/Tests/FtsTest.php @@ -1,7 +1,7 @@