From c13bc9235561204fe04882f7549c4a78877a64ee Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Fri, 13 Nov 2026 13:42:56 +0800 Subject: [PATCH] test: move tests to the `CodeIgniter\Shield\Tests` namespace --- composer.json | 2 +- phpstan-baseline.php | 36 ------------------- phpstan.dist.neon | 2 -- pyrameter.php | 4 +-- tests/Authentication/AccessTokenTest.php | 4 +-- tests/Authentication/AuthHelperTest.php | 4 +-- tests/Authentication/AuthTest.php | 4 +-- tests/Authentication/AuthenticationTest.php | 4 +-- .../AccessTokenAuthenticatorTest.php | 4 +-- .../Authenticators/HmacAuthenticatorTest.php | 4 +-- .../Authenticators/JWTAuthenticatorTest.php | 4 +-- .../SessionAuthenticatorTest.php | 6 ++-- .../Filters/AbstractFilterTestCase.php | 4 +-- .../Authentication/Filters/AuthRatesTest.php | 4 +-- .../Filters/ChainFilterTest.php | 4 +-- .../Filters/GroupFilterTest.php | 2 +- .../Authentication/Filters/HmacFilterTest.php | 2 +- .../Authentication/Filters/JWTFilterTest.php | 4 +-- .../Filters/PermissionFilterTest.php | 2 +- .../Filters/SessionFilterTest.php | 2 +- .../Filters/TokenFilterTest.php | 2 +- .../Authentication/ForcePasswordResetTest.php | 4 +-- tests/Authentication/HasAccessTokensTest.php | 4 +-- tests/Authentication/HasHmacTokensTest.php | 4 +-- tests/Authentication/MagicLinkTest.php | 4 +-- tests/Authorization/AuthorizableTest.php | 6 ++-- tests/Authorization/GroupTest.php | 4 +-- tests/Authorization/GroupsTest.php | 4 +-- tests/Authorization/PermissionMatcherTest.php | 4 +-- tests/Collectors/AuthTest.php | 4 +-- .../GenerateDummyPasswordHashTest.php | 4 +-- tests/Commands/HmacTest.php | 4 +-- tests/Commands/Setup/ContentReplacerTest.php | 4 +-- tests/Commands/SetupTest.php | 4 +-- tests/Commands/UserModelGeneratorTest.php | 2 +- tests/Commands/UserTest.php | 4 +-- tests/Controllers/ActionsTest.php | 6 ++-- tests/Controllers/LoginTest.php | 6 ++-- tests/Controllers/MagicLinkTest.php | 6 ++-- tests/Controllers/RegisterTest.php | 6 ++-- tests/{_support => }/DatabaseTestCase.php | 2 +- tests/{_support => }/FakeUser.php | 2 +- .../Language/AbstractTranslationTestCase.php | 2 +- tests/Language/ArabicTranslationTest.php | 2 +- tests/Language/BrazilianTranslationTest.php | 2 +- tests/Language/BulgarianTranslationTest.php | 2 +- tests/Language/CzechTranslationTest.php | 2 +- tests/Language/DutchTranslationTest.php | 2 +- tests/Language/FarsiTranslationTest.php | 2 +- tests/Language/FrenchTranslationTest.php | 2 +- tests/Language/GermanTranslationTest.php | 2 +- tests/Language/IndonesianTranslationTest.php | 2 +- tests/Language/ItalianTranslationTest.php | 2 +- tests/Language/JapaneseTranslationTest.php | 2 +- tests/Language/LithuanianTranslationTest.php | 2 +- tests/Language/PolishTranslationTest.php | 2 +- tests/Language/PortugueseTranslationTest.php | 2 +- tests/Language/RussianTranslationTest.php | 2 +- tests/Language/SerbianTranslationTest.php | 2 +- tests/Language/SlovakTranslationTest.php | 2 +- tests/Language/SpanishTranslationTest.php | 2 +- tests/Language/SwedishTranslationTest.php | 2 +- tests/Language/TurkishTranslationTest.php | 2 +- tests/Language/UkrainianTranslationTest.php | 2 +- tests/{_support => }/TestCase.php | 2 +- tests/Unit/AuthRoutesTest.php | 4 +-- .../JWT/Adapters/FirebaseAdapaterTest.php | 4 +-- .../Authentication/JWT/JWTManagerTest.php | 4 +-- tests/Unit/CompositionValidatorTest.php | 4 +-- tests/Unit/DictionaryValidatorTest.php | 2 +- tests/Unit/EmailActivatorTest.php | 4 +-- tests/Unit/FilterInCliTest.php | 4 +-- tests/Unit/LoginModelTest.php | 4 +-- tests/Unit/NothingPersonalValidatorTest.php | 2 +- tests/Unit/PasswordsTest.php | 2 +- tests/Unit/PwnedValidatorTest.php | 2 +- tests/Unit/UserIdentityModelTest.php | 4 +-- tests/Unit/UserModelTest.php | 4 +-- tests/Unit/UserTest.php | 6 ++-- tests/Unit/ValidationRulesTest.php | 6 ++-- 80 files changed, 128 insertions(+), 166 deletions(-) rename tests/{_support => }/DatabaseTestCase.php (95%) rename tests/{_support => }/FakeUser.php (93%) rename tests/{_support => }/TestCase.php (98%) diff --git a/composer.json b/composer.json index f5fc60483..534c2555f 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ }, "autoload-dev": { "psr-4": { - "Tests\\": "tests", + "CodeIgniter\\Shield\\Tests\\": "tests", "Tests\\Support\\": "tests/_support" } }, diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 984e2eae0..1a1b375cd 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -187,42 +187,6 @@ 'count' => 1, 'path' => __DIR__ . '/src/Models/UserModel.php', ]; -$ignoreErrors[] = [ - 'rawMessage' => 'Call to method setCookie() of internal class CodeIgniter\\Superglobals from outside its root namespace CodeIgniter.', - 'identifier' => 'method.internalClass', - 'count' => 2, - 'path' => __DIR__ . '/tests/Authentication/Authenticators/SessionAuthenticatorTest.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Call to method setServer() of internal class CodeIgniter\\Superglobals from outside its root namespace CodeIgniter.', - 'identifier' => 'method.internalClass', - 'count' => 2, - 'path' => __DIR__ . '/tests/Controllers/ActionsTest.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Call to method unsetServer() of internal class CodeIgniter\\Superglobals from outside its root namespace CodeIgniter.', - 'identifier' => 'method.internalClass', - 'count' => 1, - 'path' => __DIR__ . '/tests/Controllers/ActionsTest.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Call to method setCookie() of internal class CodeIgniter\\Superglobals from outside its root namespace CodeIgniter.', - 'identifier' => 'method.internalClass', - 'count' => 1, - 'path' => __DIR__ . '/tests/Controllers/LoginTest.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Call to method setServer() of internal class CodeIgniter\\Superglobals from outside its root namespace CodeIgniter.', - 'identifier' => 'method.internalClass', - 'count' => 1, - 'path' => __DIR__ . '/tests/Controllers/MagicLinkTest.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Call to method unsetServer() of internal class CodeIgniter\\Superglobals from outside its root namespace CodeIgniter.', - 'identifier' => 'method.internalClass', - 'count' => 1, - 'path' => __DIR__ . '/tests/Controllers/MagicLinkTest.php', -]; $ignoreErrors[] = [ 'rawMessage' => 'Call to deprecated method __construct() of class CodeIgniter\\HTTP\\Response: 4.5.0 The param $config is no longer used.', diff --git a/phpstan.dist.neon b/phpstan.dist.neon index c95598b17..5dff4c621 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -27,8 +27,6 @@ parameters: - CodeIgniter\Shield\Config\Services ignoreErrors: - identifier: function.internal - - identifier: return.internalClass - - identifier: staticMethod.internal - message: '#Dynamic call to static method PHPUnit\\#' identifier: staticMethod.dynamicCall diff --git a/pyrameter.php b/pyrameter.php index c285aa73b..374b57075 100644 --- a/pyrameter.php +++ b/pyrameter.php @@ -13,10 +13,10 @@ use Boundwize\Pyrameter\Config\PyrameterConfig; use Boundwize\Pyrameter\TestKind; +use CodeIgniter\Shield\Tests\Authentication\Filters\AbstractFilterTestCase; +use CodeIgniter\Shield\Tests\DatabaseTestCase; use CodeIgniter\Test\DatabaseTestTrait; use CodeIgniter\Test\FeatureTestTrait; -use Tests\Authentication\Filters\AbstractFilterTestCase; -use Tests\Support\DatabaseTestCase; return PyrameterConfig::create() ->usesClass( diff --git a/tests/Authentication/AccessTokenTest.php b/tests/Authentication/AccessTokenTest.php index 2103b0f9d..136ceac2a 100644 --- a/tests/Authentication/AccessTokenTest.php +++ b/tests/Authentication/AccessTokenTest.php @@ -11,10 +11,10 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication; +namespace CodeIgniter\Shield\Tests\Authentication; use CodeIgniter\Shield\Entities\AccessToken; -use Tests\Support\DatabaseTestCase; +use CodeIgniter\Shield\Tests\DatabaseTestCase; /** * @internal diff --git a/tests/Authentication/AuthHelperTest.php b/tests/Authentication/AuthHelperTest.php index 0af44a990..fcbe65f1e 100644 --- a/tests/Authentication/AuthHelperTest.php +++ b/tests/Authentication/AuthHelperTest.php @@ -11,12 +11,12 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication; +namespace CodeIgniter\Shield\Tests\Authentication; use CodeIgniter\Shield\Authentication\AuthenticationException; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\TestCase; use CodeIgniter\Test\DatabaseTestTrait; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Authentication/AuthTest.php b/tests/Authentication/AuthTest.php index 429184b5d..588c29d6f 100644 --- a/tests/Authentication/AuthTest.php +++ b/tests/Authentication/AuthTest.php @@ -11,10 +11,10 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication; +namespace CodeIgniter\Shield\Tests\Authentication; use CodeIgniter\Shield\Config\Services; -use Tests\Support\DatabaseTestCase; +use CodeIgniter\Shield\Tests\DatabaseTestCase; /** * @internal diff --git a/tests/Authentication/AuthenticationTest.php b/tests/Authentication/AuthenticationTest.php index 27d8029cc..4ef4769ca 100644 --- a/tests/Authentication/AuthenticationTest.php +++ b/tests/Authentication/AuthenticationTest.php @@ -11,14 +11,14 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication; +namespace CodeIgniter\Shield\Tests\Authentication; use CodeIgniter\Shield\Authentication\Authentication; use CodeIgniter\Shield\Authentication\AuthenticationException; use CodeIgniter\Shield\Authentication\Authenticators\Session; use CodeIgniter\Shield\Config\Auth; use CodeIgniter\Shield\Models\UserModel; -use Tests\Support\DatabaseTestCase; +use CodeIgniter\Shield\Tests\DatabaseTestCase; /** * @internal diff --git a/tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php b/tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php index 6a1edf922..a65eb198c 100644 --- a/tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php +++ b/tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Authenticators; +namespace CodeIgniter\Shield\Tests\Authentication\Authenticators; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Authentication\Authentication; @@ -22,9 +22,9 @@ use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Models\UserIdentityModel; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\DatabaseTestCase; use CodeIgniter\Test\Mock\MockEvents; use Config\Services; -use Tests\Support\DatabaseTestCase; /** * @internal diff --git a/tests/Authentication/Authenticators/HmacAuthenticatorTest.php b/tests/Authentication/Authenticators/HmacAuthenticatorTest.php index f0dc10a67..6992fcff5 100644 --- a/tests/Authentication/Authenticators/HmacAuthenticatorTest.php +++ b/tests/Authentication/Authenticators/HmacAuthenticatorTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Authenticators; +namespace CodeIgniter\Shield\Tests\Authentication\Authenticators; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Authentication\Authentication; @@ -22,9 +22,9 @@ use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Models\UserIdentityModel; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\DatabaseTestCase; use CodeIgniter\Test\Mock\MockEvents; use Config\Services; -use Tests\Support\DatabaseTestCase; /** * @internal diff --git a/tests/Authentication/Authenticators/JWTAuthenticatorTest.php b/tests/Authentication/Authenticators/JWTAuthenticatorTest.php index 24399b43f..af0619fa7 100644 --- a/tests/Authentication/Authenticators/JWTAuthenticatorTest.php +++ b/tests/Authentication/Authenticators/JWTAuthenticatorTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Authenticators; +namespace CodeIgniter\Shield\Tests\Authentication\Authenticators; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Authentication\Authentication; @@ -22,11 +22,11 @@ use CodeIgniter\Shield\Config\AuthJWT; use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\DatabaseTestCase; use CodeIgniter\Test\Mock\MockEvents; use Config\Services; use Firebase\JWT\JWT as FirebaseJWT; use InvalidArgumentException; -use Tests\Support\DatabaseTestCase; /** * @internal diff --git a/tests/Authentication/Authenticators/SessionAuthenticatorTest.php b/tests/Authentication/Authenticators/SessionAuthenticatorTest.php index 3e4bffa36..644d54a5f 100644 --- a/tests/Authentication/Authenticators/SessionAuthenticatorTest.php +++ b/tests/Authentication/Authenticators/SessionAuthenticatorTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Authenticators; +namespace CodeIgniter\Shield\Tests\Authentication\Authenticators; use CodeIgniter\Config\Factories; use CodeIgniter\Shield\Authentication\Authentication; @@ -23,11 +23,11 @@ use CodeIgniter\Shield\Exceptions\LogicException; use CodeIgniter\Shield\Models\RememberModel; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\DatabaseTestCase; +use CodeIgniter\Shield\Tests\FakeUser; use CodeIgniter\Test\Mock\MockEvents; use Config\Services; use PHPUnit\Framework\Attributes\DataProvider; -use Tests\Support\DatabaseTestCase; -use Tests\Support\FakeUser; /** * @internal diff --git a/tests/Authentication/Filters/AbstractFilterTestCase.php b/tests/Authentication/Filters/AbstractFilterTestCase.php index 9897443bc..524d70fd3 100644 --- a/tests/Authentication/Filters/AbstractFilterTestCase.php +++ b/tests/Authentication/Filters/AbstractFilterTestCase.php @@ -11,13 +11,13 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Filters; +namespace CodeIgniter\Shield\Tests\Authentication\Filters; use CodeIgniter\Config\Factories; use CodeIgniter\Shield\Test\AuthenticationTesting; +use CodeIgniter\Shield\Tests\TestCase; use CodeIgniter\Test\FeatureTestTrait; use Config\Services; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Authentication/Filters/AuthRatesTest.php b/tests/Authentication/Filters/AuthRatesTest.php index e81c43247..9b8381e59 100644 --- a/tests/Authentication/Filters/AuthRatesTest.php +++ b/tests/Authentication/Filters/AuthRatesTest.php @@ -11,15 +11,15 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Filters; +namespace CodeIgniter\Shield\Tests\Authentication\Filters; use CodeIgniter\HTTP\CLIRequest; use CodeIgniter\HTTP\IncomingRequest; use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\Shield\Filters\AuthRates; +use CodeIgniter\Shield\Tests\TestCase; use CodeIgniter\Throttle\Throttler; use Config\Services; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Authentication/Filters/ChainFilterTest.php b/tests/Authentication/Filters/ChainFilterTest.php index b1c81aad4..baec7e8ef 100644 --- a/tests/Authentication/Filters/ChainFilterTest.php +++ b/tests/Authentication/Filters/ChainFilterTest.php @@ -11,12 +11,12 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Filters; +namespace CodeIgniter\Shield\Tests\Authentication\Filters; use CodeIgniter\Shield\Entities\AccessToken; use CodeIgniter\Shield\Filters\ChainAuth; +use CodeIgniter\Shield\Tests\FakeUser; use CodeIgniter\Test\DatabaseTestTrait; -use Tests\Support\FakeUser; /** * @internal diff --git a/tests/Authentication/Filters/GroupFilterTest.php b/tests/Authentication/Filters/GroupFilterTest.php index 14bf07d35..a30e90f4a 100644 --- a/tests/Authentication/Filters/GroupFilterTest.php +++ b/tests/Authentication/Filters/GroupFilterTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Filters; +namespace CodeIgniter\Shield\Tests\Authentication\Filters; use CodeIgniter\Shield\Filters\GroupFilter; use CodeIgniter\Shield\Models\UserModel; diff --git a/tests/Authentication/Filters/HmacFilterTest.php b/tests/Authentication/Filters/HmacFilterTest.php index ffb516313..ae2235ebd 100644 --- a/tests/Authentication/Filters/HmacFilterTest.php +++ b/tests/Authentication/Filters/HmacFilterTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Filters; +namespace CodeIgniter\Shield\Tests\Authentication\Filters; use CodeIgniter\Shield\Entities\AccessToken; use CodeIgniter\Shield\Entities\User; diff --git a/tests/Authentication/Filters/JWTFilterTest.php b/tests/Authentication/Filters/JWTFilterTest.php index 5502fe759..c4b14c8f2 100644 --- a/tests/Authentication/Filters/JWTFilterTest.php +++ b/tests/Authentication/Filters/JWTFilterTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Filters; +namespace CodeIgniter\Shield\Tests\Authentication\Filters; use CodeIgniter\Config\Factories; use CodeIgniter\Shield\Authentication\Authenticators\JWT; @@ -20,9 +20,9 @@ use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Filters\JWTAuth; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\DatabaseTestCase; use CodeIgniter\Test\FeatureTestTrait; use Config\Services; -use Tests\Support\DatabaseTestCase; /** * @internal diff --git a/tests/Authentication/Filters/PermissionFilterTest.php b/tests/Authentication/Filters/PermissionFilterTest.php index a118bca24..b1305bfa4 100644 --- a/tests/Authentication/Filters/PermissionFilterTest.php +++ b/tests/Authentication/Filters/PermissionFilterTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Filters; +namespace CodeIgniter\Shield\Tests\Authentication\Filters; use CodeIgniter\Shield\Filters\PermissionFilter; use CodeIgniter\Shield\Models\UserModel; diff --git a/tests/Authentication/Filters/SessionFilterTest.php b/tests/Authentication/Filters/SessionFilterTest.php index eece7ac15..933d10041 100644 --- a/tests/Authentication/Filters/SessionFilterTest.php +++ b/tests/Authentication/Filters/SessionFilterTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Filters; +namespace CodeIgniter\Shield\Tests\Authentication\Filters; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Authentication\Authenticators\Session; diff --git a/tests/Authentication/Filters/TokenFilterTest.php b/tests/Authentication/Filters/TokenFilterTest.php index c080be2df..fb399aed6 100644 --- a/tests/Authentication/Filters/TokenFilterTest.php +++ b/tests/Authentication/Filters/TokenFilterTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication\Filters; +namespace CodeIgniter\Shield\Tests\Authentication\Filters; use CodeIgniter\Shield\Entities\AccessToken; use CodeIgniter\Shield\Entities\User; diff --git a/tests/Authentication/ForcePasswordResetTest.php b/tests/Authentication/ForcePasswordResetTest.php index 22df88e6f..09ae154c0 100644 --- a/tests/Authentication/ForcePasswordResetTest.php +++ b/tests/Authentication/ForcePasswordResetTest.php @@ -11,15 +11,15 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication; +namespace CodeIgniter\Shield\Tests\Authentication; use CodeIgniter\Shield\Models\UserIdentityModel; use CodeIgniter\Shield\Models\UserModel; use CodeIgniter\Shield\Test\AuthenticationTesting; +use CodeIgniter\Shield\Tests\TestCase; use CodeIgniter\Test\DatabaseTestTrait; use CodeIgniter\Test\FeatureTestTrait; use Config\Services; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Authentication/HasAccessTokensTest.php b/tests/Authentication/HasAccessTokensTest.php index 56ce55a60..27d2d1044 100644 --- a/tests/Authentication/HasAccessTokensTest.php +++ b/tests/Authentication/HasAccessTokensTest.php @@ -11,14 +11,14 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication; +namespace CodeIgniter\Shield\Tests\Authentication; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Entities\AccessToken; use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Models\UserIdentityModel; use CodeIgniter\Shield\Models\UserModel; -use Tests\Support\DatabaseTestCase; +use CodeIgniter\Shield\Tests\DatabaseTestCase; /** * @internal diff --git a/tests/Authentication/HasHmacTokensTest.php b/tests/Authentication/HasHmacTokensTest.php index b7a64ff24..e842f3302 100644 --- a/tests/Authentication/HasHmacTokensTest.php +++ b/tests/Authentication/HasHmacTokensTest.php @@ -11,14 +11,14 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication; +namespace CodeIgniter\Shield\Tests\Authentication; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Entities\AccessToken; use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Models\UserIdentityModel; use CodeIgniter\Shield\Models\UserModel; -use Tests\Support\DatabaseTestCase; +use CodeIgniter\Shield\Tests\DatabaseTestCase; /** * @internal diff --git a/tests/Authentication/MagicLinkTest.php b/tests/Authentication/MagicLinkTest.php index a9d7468ad..4aa9ff6b9 100644 --- a/tests/Authentication/MagicLinkTest.php +++ b/tests/Authentication/MagicLinkTest.php @@ -11,16 +11,16 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authentication; +namespace CodeIgniter\Shield\Tests\Authentication; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Authentication\Authenticators\Session; use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Models\UserIdentityModel; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\DatabaseTestCase; use CodeIgniter\Test\FeatureTestTrait; use Config\Services; -use Tests\Support\DatabaseTestCase; /** * @internal diff --git a/tests/Authorization/AuthorizableTest.php b/tests/Authorization/AuthorizableTest.php index 22a31d15b..6b84511e5 100644 --- a/tests/Authorization/AuthorizableTest.php +++ b/tests/Authorization/AuthorizableTest.php @@ -11,14 +11,14 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authorization; +namespace CodeIgniter\Shield\Tests\Authorization; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Authorization\AuthorizationException; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\DatabaseTestCase; +use CodeIgniter\Shield\Tests\FakeUser; use Locale; -use Tests\Support\DatabaseTestCase; -use Tests\Support\FakeUser; /** * @internal diff --git a/tests/Authorization/GroupTest.php b/tests/Authorization/GroupTest.php index 4434d071e..927f593ad 100644 --- a/tests/Authorization/GroupTest.php +++ b/tests/Authorization/GroupTest.php @@ -11,11 +11,11 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authorization; +namespace CodeIgniter\Shield\Tests\Authorization; use CodeIgniter\Shield\Authorization\Groups; +use CodeIgniter\Shield\Tests\TestCase; use CodeIgniter\Test\DatabaseTestTrait; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Authorization/GroupsTest.php b/tests/Authorization/GroupsTest.php index b4b1ba32f..273efa92f 100644 --- a/tests/Authorization/GroupsTest.php +++ b/tests/Authorization/GroupsTest.php @@ -11,13 +11,13 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authorization; +namespace CodeIgniter\Shield\Tests\Authorization; use CodeIgniter\Shield\Authorization\Groups; use CodeIgniter\Shield\Entities\Group; +use CodeIgniter\Shield\Tests\TestCase; use CodeIgniter\Test\DatabaseTestTrait; use RuntimeException; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Authorization/PermissionMatcherTest.php b/tests/Authorization/PermissionMatcherTest.php index bf3b8fcd7..92684727f 100644 --- a/tests/Authorization/PermissionMatcherTest.php +++ b/tests/Authorization/PermissionMatcherTest.php @@ -11,11 +11,11 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Authorization; +namespace CodeIgniter\Shield\Tests\Authorization; use CodeIgniter\Shield\Authorization\PermissionMatcher; +use CodeIgniter\Shield\Tests\TestCase; use PHPUnit\Framework\Attributes\DataProvider; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Collectors/AuthTest.php b/tests/Collectors/AuthTest.php index 47e856abe..8ec5495d4 100644 --- a/tests/Collectors/AuthTest.php +++ b/tests/Collectors/AuthTest.php @@ -11,15 +11,15 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Collectors; +namespace CodeIgniter\Shield\Tests\Collectors; use CodeIgniter\Shield\Auth as ShieldAuth; use CodeIgniter\Shield\Authentication\Authenticators\Session; use CodeIgniter\Shield\Collectors\Auth; use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\TestCase; use CodeIgniter\Test\DatabaseTestTrait; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Commands/GenerateDummyPasswordHashTest.php b/tests/Commands/GenerateDummyPasswordHashTest.php index 6527443df..dbd197499 100644 --- a/tests/Commands/GenerateDummyPasswordHashTest.php +++ b/tests/Commands/GenerateDummyPasswordHashTest.php @@ -11,13 +11,13 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Commands; +namespace CodeIgniter\Shield\Tests\Commands; use CodeIgniter\Shield\Authentication\Passwords; use CodeIgniter\Shield\Commands\GenerateDummyPasswordHash; use CodeIgniter\Shield\Test\MockInputOutput; +use CodeIgniter\Shield\Tests\TestCase; use Config\Services; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Commands/HmacTest.php b/tests/Commands/HmacTest.php index 34f91ccfc..ee450742a 100644 --- a/tests/Commands/HmacTest.php +++ b/tests/Commands/HmacTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Commands; +namespace CodeIgniter\Shield\Tests\Commands; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Authentication\HMAC\HmacEncrypter; @@ -21,8 +21,8 @@ use CodeIgniter\Shield\Models\UserIdentityModel; use CodeIgniter\Shield\Models\UserModel; use CodeIgniter\Shield\Test\MockInputOutput; +use CodeIgniter\Shield\Tests\DatabaseTestCase; use Config\Services; -use Tests\Support\DatabaseTestCase; /** * @internal diff --git a/tests/Commands/Setup/ContentReplacerTest.php b/tests/Commands/Setup/ContentReplacerTest.php index e24e693d6..4fb1fbcb4 100644 --- a/tests/Commands/Setup/ContentReplacerTest.php +++ b/tests/Commands/Setup/ContentReplacerTest.php @@ -11,10 +11,10 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Commands\Setup; +namespace CodeIgniter\Shield\Tests\Commands\Setup; use CodeIgniter\Shield\Commands\Setup\ContentReplacer; -use Tests\Support\TestCase; +use CodeIgniter\Shield\Tests\TestCase; /** * @internal diff --git a/tests/Commands/SetupTest.php b/tests/Commands/SetupTest.php index 055a27e90..f52e28a01 100644 --- a/tests/Commands/SetupTest.php +++ b/tests/Commands/SetupTest.php @@ -11,17 +11,17 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Commands; +namespace CodeIgniter\Shield\Tests\Commands; use CodeIgniter\Shield\Commands\Setup; use CodeIgniter\Shield\Test\MockInputOutput; +use CodeIgniter\Shield\Tests\TestCase; use Config\Email as EmailConfig; use Config\Services; use FilesystemIterator; use org\bovigo\vfs\vfsStream; use RecursiveDirectoryIterator; use RecursiveIteratorIterator; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Commands/UserModelGeneratorTest.php b/tests/Commands/UserModelGeneratorTest.php index 0e64f4080..5c731cd85 100644 --- a/tests/Commands/UserModelGeneratorTest.php +++ b/tests/Commands/UserModelGeneratorTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Commands; +namespace CodeIgniter\Shield\Tests\Commands; use CodeIgniter\Test\CIUnitTestCase; use CodeIgniter\Test\Filters\CITestStreamFilter; diff --git a/tests/Commands/UserTest.php b/tests/Commands/UserTest.php index 8ba552bd2..fc097f06d 100644 --- a/tests/Commands/UserTest.php +++ b/tests/Commands/UserTest.php @@ -11,14 +11,14 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Commands; +namespace CodeIgniter\Shield\Tests\Commands; use CodeIgniter\Shield\Commands\User; use CodeIgniter\Shield\Config\AuthGroups; use CodeIgniter\Shield\Entities\User as UserEntity; use CodeIgniter\Shield\Models\UserModel; use CodeIgniter\Shield\Test\MockInputOutput; -use Tests\Support\DatabaseTestCase; +use CodeIgniter\Shield\Tests\DatabaseTestCase; /** * @internal diff --git a/tests/Controllers/ActionsTest.php b/tests/Controllers/ActionsTest.php index 3025dd1a8..8f39a01bc 100644 --- a/tests/Controllers/ActionsTest.php +++ b/tests/Controllers/ActionsTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Controllers; +namespace CodeIgniter\Shield\Tests\Controllers; use CodeIgniter\Config\Factories; use CodeIgniter\Exceptions\PageNotFoundException; @@ -20,11 +20,11 @@ use CodeIgniter\Shield\Authentication\Authenticators\Session; use CodeIgniter\Shield\Models\UserIdentityModel; use CodeIgniter\Shield\Test\AuthenticationTesting; +use CodeIgniter\Shield\Tests\DatabaseTestCase; +use CodeIgniter\Shield\Tests\FakeUser; use CodeIgniter\Test\DatabaseTestTrait; use CodeIgniter\Test\FeatureTestTrait; use Config\Services; -use Tests\Support\DatabaseTestCase; -use Tests\Support\FakeUser; /** * @internal diff --git a/tests/Controllers/LoginTest.php b/tests/Controllers/LoginTest.php index db2343754..b62bb955f 100644 --- a/tests/Controllers/LoginTest.php +++ b/tests/Controllers/LoginTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Controllers; +namespace CodeIgniter\Shield\Tests\Controllers; use CodeIgniter\Config\Factories; use CodeIgniter\I18n\Time; @@ -19,13 +19,13 @@ use CodeIgniter\Shield\Config\Auth; use CodeIgniter\Shield\Models\RememberModel; use CodeIgniter\Shield\Models\UserIdentityModel; +use CodeIgniter\Shield\Tests\DatabaseTestCase; +use CodeIgniter\Shield\Tests\FakeUser; use CodeIgniter\Test\FeatureTestTrait; use CodeIgniter\Test\TestResponse; use Config\Services; use Config\Validation; use Tests\Support\AdminEmail2FA; -use Tests\Support\DatabaseTestCase; -use Tests\Support\FakeUser; /** * @internal diff --git a/tests/Controllers/MagicLinkTest.php b/tests/Controllers/MagicLinkTest.php index 4330d2166..567963138 100644 --- a/tests/Controllers/MagicLinkTest.php +++ b/tests/Controllers/MagicLinkTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Controllers; +namespace CodeIgniter\Shield\Tests\Controllers; use CodeIgniter\Config\Factories; use CodeIgniter\Exceptions\PageNotFoundException; @@ -22,13 +22,13 @@ use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Models\UserIdentityModel; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\FakeUser; +use CodeIgniter\Shield\Tests\TestCase; use CodeIgniter\Test\DatabaseTestTrait; use CodeIgniter\Test\FeatureTestTrait; use Config\Services; use Tests\Support\AdminEmail2FA; use Tests\Support\AdminEmailActivator; -use Tests\Support\FakeUser; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Controllers/RegisterTest.php b/tests/Controllers/RegisterTest.php index 2b43717c3..2adb772a9 100644 --- a/tests/Controllers/RegisterTest.php +++ b/tests/Controllers/RegisterTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Controllers; +namespace CodeIgniter\Shield\Tests\Controllers; use CodeIgniter\Config\Factories; use CodeIgniter\Shield\Authentication\Actions\EmailActivator; @@ -20,11 +20,11 @@ use CodeIgniter\Shield\Config\Auth; use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\DatabaseTestCase; +use CodeIgniter\Shield\Tests\FakeUser; use CodeIgniter\Test\FeatureTestTrait; use Config\Services; use Tests\Support\AdminEmailActivator; -use Tests\Support\DatabaseTestCase; -use Tests\Support\FakeUser; /** * @internal diff --git a/tests/_support/DatabaseTestCase.php b/tests/DatabaseTestCase.php similarity index 95% rename from tests/_support/DatabaseTestCase.php rename to tests/DatabaseTestCase.php index c4c0fdc3b..d086e4317 100644 --- a/tests/_support/DatabaseTestCase.php +++ b/tests/DatabaseTestCase.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Support; +namespace CodeIgniter\Shield\Tests; use CodeIgniter\Shield\Config\Auth; use CodeIgniter\Test\DatabaseTestTrait; diff --git a/tests/_support/FakeUser.php b/tests/FakeUser.php similarity index 93% rename from tests/_support/FakeUser.php rename to tests/FakeUser.php index 1dcb62fd8..ce129f601 100644 --- a/tests/_support/FakeUser.php +++ b/tests/FakeUser.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Support; +namespace CodeIgniter\Shield\Tests; use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Models\UserModel; diff --git a/tests/Language/AbstractTranslationTestCase.php b/tests/Language/AbstractTranslationTestCase.php index c7173f446..7b394dc5d 100644 --- a/tests/Language/AbstractTranslationTestCase.php +++ b/tests/Language/AbstractTranslationTestCase.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; use CodeIgniter\CLI\CLI; use PHPUnit\Framework\Attributes\DataProvider; diff --git a/tests/Language/ArabicTranslationTest.php b/tests/Language/ArabicTranslationTest.php index fbb449d82..9b21881f7 100644 --- a/tests/Language/ArabicTranslationTest.php +++ b/tests/Language/ArabicTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/BrazilianTranslationTest.php b/tests/Language/BrazilianTranslationTest.php index 288905b2f..15f046e36 100644 --- a/tests/Language/BrazilianTranslationTest.php +++ b/tests/Language/BrazilianTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/BulgarianTranslationTest.php b/tests/Language/BulgarianTranslationTest.php index ab26a4d5f..5903f8ec5 100644 --- a/tests/Language/BulgarianTranslationTest.php +++ b/tests/Language/BulgarianTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/CzechTranslationTest.php b/tests/Language/CzechTranslationTest.php index a4c9e60de..295bc5da7 100644 --- a/tests/Language/CzechTranslationTest.php +++ b/tests/Language/CzechTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/DutchTranslationTest.php b/tests/Language/DutchTranslationTest.php index f4d833378..213600572 100644 --- a/tests/Language/DutchTranslationTest.php +++ b/tests/Language/DutchTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/FarsiTranslationTest.php b/tests/Language/FarsiTranslationTest.php index ffa8942fe..f0d3fb5c1 100644 --- a/tests/Language/FarsiTranslationTest.php +++ b/tests/Language/FarsiTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/FrenchTranslationTest.php b/tests/Language/FrenchTranslationTest.php index 2ece0ee22..ee5b78e1b 100644 --- a/tests/Language/FrenchTranslationTest.php +++ b/tests/Language/FrenchTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/GermanTranslationTest.php b/tests/Language/GermanTranslationTest.php index 879651454..2809a6d6d 100644 --- a/tests/Language/GermanTranslationTest.php +++ b/tests/Language/GermanTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/IndonesianTranslationTest.php b/tests/Language/IndonesianTranslationTest.php index 457b0365a..4dab7f663 100644 --- a/tests/Language/IndonesianTranslationTest.php +++ b/tests/Language/IndonesianTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/ItalianTranslationTest.php b/tests/Language/ItalianTranslationTest.php index 13a61ce44..446fb3213 100644 --- a/tests/Language/ItalianTranslationTest.php +++ b/tests/Language/ItalianTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/JapaneseTranslationTest.php b/tests/Language/JapaneseTranslationTest.php index 4d908479e..ce1f38153 100644 --- a/tests/Language/JapaneseTranslationTest.php +++ b/tests/Language/JapaneseTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/LithuanianTranslationTest.php b/tests/Language/LithuanianTranslationTest.php index bbaebedd1..5ac33a8a5 100644 --- a/tests/Language/LithuanianTranslationTest.php +++ b/tests/Language/LithuanianTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/PolishTranslationTest.php b/tests/Language/PolishTranslationTest.php index 0b43c73ed..2a926ca3a 100644 --- a/tests/Language/PolishTranslationTest.php +++ b/tests/Language/PolishTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/PortugueseTranslationTest.php b/tests/Language/PortugueseTranslationTest.php index 7e976cead..2b7bd91eb 100644 --- a/tests/Language/PortugueseTranslationTest.php +++ b/tests/Language/PortugueseTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/RussianTranslationTest.php b/tests/Language/RussianTranslationTest.php index 313668214..52d892912 100644 --- a/tests/Language/RussianTranslationTest.php +++ b/tests/Language/RussianTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/SerbianTranslationTest.php b/tests/Language/SerbianTranslationTest.php index df9978f82..740c5e6f6 100644 --- a/tests/Language/SerbianTranslationTest.php +++ b/tests/Language/SerbianTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/SlovakTranslationTest.php b/tests/Language/SlovakTranslationTest.php index a073dace3..ef487c021 100644 --- a/tests/Language/SlovakTranslationTest.php +++ b/tests/Language/SlovakTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/SpanishTranslationTest.php b/tests/Language/SpanishTranslationTest.php index 15bca9a43..ffc149d65 100644 --- a/tests/Language/SpanishTranslationTest.php +++ b/tests/Language/SpanishTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/SwedishTranslationTest.php b/tests/Language/SwedishTranslationTest.php index da1d818b9..b0b7fef64 100644 --- a/tests/Language/SwedishTranslationTest.php +++ b/tests/Language/SwedishTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/TurkishTranslationTest.php b/tests/Language/TurkishTranslationTest.php index a31afd2a3..df23eb11e 100644 --- a/tests/Language/TurkishTranslationTest.php +++ b/tests/Language/TurkishTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/Language/UkrainianTranslationTest.php b/tests/Language/UkrainianTranslationTest.php index f8bc3ff31..0cef0405a 100644 --- a/tests/Language/UkrainianTranslationTest.php +++ b/tests/Language/UkrainianTranslationTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Language; +namespace CodeIgniter\Shield\Tests\Language; /** * @internal diff --git a/tests/_support/TestCase.php b/tests/TestCase.php similarity index 98% rename from tests/_support/TestCase.php rename to tests/TestCase.php index 7f37a087e..6b531bee8 100644 --- a/tests/_support/TestCase.php +++ b/tests/TestCase.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Support; +namespace CodeIgniter\Shield\Tests; use CodeIgniter\Config\Factories; use CodeIgniter\Settings\Settings; diff --git a/tests/Unit/AuthRoutesTest.php b/tests/Unit/AuthRoutesTest.php index 191331a7b..644b9561b 100644 --- a/tests/Unit/AuthRoutesTest.php +++ b/tests/Unit/AuthRoutesTest.php @@ -11,13 +11,13 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\CodeIgniter; use CodeIgniter\Router\RouteCollection; use CodeIgniter\Shield\Auth; +use CodeIgniter\Shield\Tests\TestCase; use InvalidArgumentException; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Unit/Authentication/JWT/Adapters/FirebaseAdapaterTest.php b/tests/Unit/Authentication/JWT/Adapters/FirebaseAdapaterTest.php index cc1032e5c..e95f74cc3 100644 --- a/tests/Unit/Authentication/JWT/Adapters/FirebaseAdapaterTest.php +++ b/tests/Unit/Authentication/JWT/Adapters/FirebaseAdapaterTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit\Authentication\JWT\Adapters; +namespace CodeIgniter\Shield\Tests\Unit\Authentication\JWT\Adapters; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Authentication\JWT\Adapters\FirebaseAdapter; @@ -21,7 +21,7 @@ use CodeIgniter\Shield\Exceptions\InvalidArgumentException as ShieldInvalidArgumentException; use CodeIgniter\Shield\Exceptions\LogicException as ShieldLogicException; use CodeIgniter\Shield\Models\UserModel; -use Tests\Support\TestCase; +use CodeIgniter\Shield\Tests\TestCase; use UnexpectedValueException; /** diff --git a/tests/Unit/Authentication/JWT/JWTManagerTest.php b/tests/Unit/Authentication/JWT/JWTManagerTest.php index 896c6e602..eed444244 100644 --- a/tests/Unit/Authentication/JWT/JWTManagerTest.php +++ b/tests/Unit/Authentication/JWT/JWTManagerTest.php @@ -11,14 +11,14 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit\Authentication\JWT; +namespace CodeIgniter\Shield\Tests\Unit\Authentication\JWT; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Authentication\JWTManager; use CodeIgniter\Shield\Config\AuthJWT; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\TestCase; use PHPUnit\Framework\Attributes\Depends; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Unit/CompositionValidatorTest.php b/tests/Unit/CompositionValidatorTest.php index 77f0df0db..cd963295b 100644 --- a/tests/Unit/CompositionValidatorTest.php +++ b/tests/Unit/CompositionValidatorTest.php @@ -11,12 +11,12 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\Shield\Authentication\AuthenticationException; use CodeIgniter\Shield\Authentication\Passwords\CompositionValidator; use CodeIgniter\Shield\Config\Auth; -use Tests\Support\TestCase; +use CodeIgniter\Shield\Tests\TestCase; /** * @internal diff --git a/tests/Unit/DictionaryValidatorTest.php b/tests/Unit/DictionaryValidatorTest.php index 2c5819862..f0047c016 100644 --- a/tests/Unit/DictionaryValidatorTest.php +++ b/tests/Unit/DictionaryValidatorTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\Shield\Authentication\Passwords\DictionaryValidator; use CodeIgniter\Shield\Config\Auth as AuthConfig; diff --git a/tests/Unit/EmailActivatorTest.php b/tests/Unit/EmailActivatorTest.php index 15d356cc0..2d089449d 100644 --- a/tests/Unit/EmailActivatorTest.php +++ b/tests/Unit/EmailActivatorTest.php @@ -11,12 +11,12 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\Shield\Authentication\Actions\EmailActivator; use CodeIgniter\Shield\Exceptions\RuntimeException; +use CodeIgniter\Shield\Tests\TestCase; use Config\Services; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Unit/FilterInCliTest.php b/tests/Unit/FilterInCliTest.php index d21ced9db..d028dabe8 100644 --- a/tests/Unit/FilterInCliTest.php +++ b/tests/Unit/FilterInCliTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\Filters\FilterInterface; use CodeIgniter\HTTP\CLIRequest; @@ -19,8 +19,8 @@ use CodeIgniter\Shield\Filters\ChainAuth; use CodeIgniter\Shield\Filters\SessionAuth; use CodeIgniter\Shield\Filters\TokenAuth; +use CodeIgniter\Shield\Tests\TestCase; use PHPUnit\Framework\Attributes\DataProvider; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Unit/LoginModelTest.php b/tests/Unit/LoginModelTest.php index 96133b2d6..7c66b8599 100644 --- a/tests/Unit/LoginModelTest.php +++ b/tests/Unit/LoginModelTest.php @@ -11,12 +11,12 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\Shield\Exceptions\ValidationException; use CodeIgniter\Shield\Models\LoginModel; +use CodeIgniter\Shield\Tests\TestCase; use CodeIgniter\Test\DatabaseTestTrait; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Unit/NothingPersonalValidatorTest.php b/tests/Unit/NothingPersonalValidatorTest.php index 207a05503..9fb8e3389 100644 --- a/tests/Unit/NothingPersonalValidatorTest.php +++ b/tests/Unit/NothingPersonalValidatorTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\Shield\Authentication\Passwords\NothingPersonalValidator; use CodeIgniter\Shield\Config\Auth; diff --git a/tests/Unit/PasswordsTest.php b/tests/Unit/PasswordsTest.php index 4719f8adf..343ab4b65 100644 --- a/tests/Unit/PasswordsTest.php +++ b/tests/Unit/PasswordsTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\Shield\Authentication\Passwords; use CodeIgniter\Shield\Config\Auth as AuthConfig; diff --git a/tests/Unit/PwnedValidatorTest.php b/tests/Unit/PwnedValidatorTest.php index e4b289662..747a621d1 100644 --- a/tests/Unit/PwnedValidatorTest.php +++ b/tests/Unit/PwnedValidatorTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\HTTP\Exceptions\HTTPException; use CodeIgniter\HTTP\Response; diff --git a/tests/Unit/UserIdentityModelTest.php b/tests/Unit/UserIdentityModelTest.php index ac9794ea8..585b17ad9 100644 --- a/tests/Unit/UserIdentityModelTest.php +++ b/tests/Unit/UserIdentityModelTest.php @@ -11,15 +11,15 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\Shield\Authentication\Authenticators\Session; use CodeIgniter\Shield\Models\DatabaseException; use CodeIgniter\Shield\Models\UserIdentityModel; use CodeIgniter\Shield\Models\UserModel; +use CodeIgniter\Shield\Tests\TestCase; use CodeIgniter\Test\DatabaseTestTrait; use CodeIgniter\Test\Fabricator; -use Tests\Support\TestCase; /** * @internal diff --git a/tests/Unit/UserModelTest.php b/tests/Unit/UserModelTest.php index b371b8011..dbf3057d7 100644 --- a/tests/Unit/UserModelTest.php +++ b/tests/Unit/UserModelTest.php @@ -11,13 +11,13 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\Database\Exceptions\DataException; use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Exceptions\LogicException; use CodeIgniter\Shield\Models\UserModel; -use Tests\Support\DatabaseTestCase; +use CodeIgniter\Shield\Tests\DatabaseTestCase; /** * @internal diff --git a/tests/Unit/UserTest.php b/tests/Unit/UserTest.php index c2e3d6a7e..93a73203d 100644 --- a/tests/Unit/UserTest.php +++ b/tests/Unit/UserTest.php @@ -11,7 +11,7 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Authentication\Authenticators\Session; @@ -23,8 +23,8 @@ use CodeIgniter\Shield\Models\PermissionModel; use CodeIgniter\Shield\Models\UserIdentityModel; use CodeIgniter\Shield\Models\UserModel; -use Tests\Support\DatabaseTestCase; -use Tests\Support\FakeUser; +use CodeIgniter\Shield\Tests\DatabaseTestCase; +use CodeIgniter\Shield\Tests\FakeUser; /** * @internal diff --git a/tests/Unit/ValidationRulesTest.php b/tests/Unit/ValidationRulesTest.php index fd030a7b6..4f73db0d7 100644 --- a/tests/Unit/ValidationRulesTest.php +++ b/tests/Unit/ValidationRulesTest.php @@ -11,11 +11,11 @@ * the LICENSE file that was distributed with this source code. */ -namespace Tests\Unit; +namespace CodeIgniter\Shield\Tests\Unit; use CodeIgniter\Shield\Authentication\Passwords\ValidationRules; -use Tests\Support\DatabaseTestCase; -use Tests\Support\FakeUser; +use CodeIgniter\Shield\Tests\DatabaseTestCase; +use CodeIgniter\Shield\Tests\FakeUser; /** * @internal