1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 10:54:04 +00:00
tenancy/tests
Abrar Ahmad bf504f4c79
[4.x] Use a dedicated DB connection for creating/deleting tenant databases (#946)
* create host connection for creating, deleting tenants

* purge connection and add more tests

* remove unused method

* Improvements

* test named

* remove host connection name config key

* Revert "remove host connection name config key"

This reverts commit 42acb823e8.

* Update DatabaseConfig.php

* Update assets/config.php

Co-authored-by: Samuel Štancl <samuel@archte.ch>

* Update DatabaseConfig.php

* todo and comments

* remove debug code

* Update DatabaseConfig.php

* strict assertions

* Update TenantDatabaseManagerTest.php

* Update src/Database/DatabaseConfig.php

Co-authored-by: Samuel Štancl <samuel@archte.ch>

* purge connection improvements

* Update DatabaseConfig.php

* Update DatabaseConfig.php

* Update DatabaseConfig.php

* improve comments

* remove "ensuring connection exists" check

* remove test because it's duplicate

* removing test because other two tests are using the same logic, so this test kinda already covered

* Update TenantDatabaseManagerTest.php

* Update DatabaseConfig.php

* Revert "Update TenantDatabaseManagerTest.php"

This reverts commit b8e0a1c982.

* add default

* Update src/Database/DatabaseConfig.php

Co-authored-by: Samuel Štancl <samuel@archte.ch>

* update comment

* remove unness mysql config and add a comment

* tenancy_db_connection tenant config test

* Update TenantDatabaseManagerTest.php

* update test name and improve assertions

* typo

* change inline variable name

* Update TenantDatabaseManagerTest.php

* Update TenantDatabaseManagerTest.php

* add DB::purge() calls

* add new assertions [ci skip]

* Fix code style (php-cs-fixer)

* replace hostManager with manager

* fix test

* method rename

Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2022-10-31 12:13:54 +01:00
..
Etc [4.x] Add command to bring the tenants up and down from maintenance and remove deprecated exception (#761) 2022-09-29 15:59:14 +02:00
Features Pull 3.x changes into master (#922) 2022-08-22 17:59:43 +02:00
ActionTest.php [4.x] Storage::url() support (modified #689) (#909) 2022-09-28 05:09:45 +02:00
AutomaticModeTest.php get down to 59 phpstan errors 2022-09-29 22:20:55 +02:00
BatchTest.php remove version checks 2022-09-29 16:02:08 +02:00
BootstrapperTest.php remove remaining version checks 2022-09-29 16:02:40 +02:00
CachedTenantResolverTest.php Add identification section to config, refactor static properties 2022-10-01 20:01:18 +02:00
CacheManagerTest.php Refactor tests to use pest() helper 2022-07-23 01:16:50 +02:00
CombinedDomainAndSubdomainIdentificationTest.php Refactor tests to use pest() helper 2022-07-23 01:16:50 +02:00
CommandsTest.php Unlink tenant schema path before each test in CommandsTest (#986) 2022-10-26 12:08:14 +02:00
DatabasePreparationTest.php add public connection() method to the Tenant DB manager interface 2022-10-25 12:53:31 +02:00
DatabaseUsersTest.php general refactor, move more classes under Database namespace 2022-08-27 03:17:16 +02:00
DebuggableTest.php wip Debuggable trait 2022-07-28 15:14:29 +02:00
DeleteDomainsJobTest.php [4.x] Migrate tests to Pest (#884) 2022-07-22 19:26:59 +02:00
DomainTest.php phpstan, global_cache, resolver improvements, InitializationHelpers trait 2022-09-29 02:47:13 +02:00
EventListenerTest.php get phpstan errors down from 252 to 189 2022-08-30 05:44:23 +02:00
GlobalCacheTest.php phpstan, global_cache, resolver improvements, InitializationHelpers trait 2022-09-29 02:47:13 +02:00
MaintenanceModeTest.php [4.x] Update commands CLI outputs (#968) 2022-10-18 19:11:57 +02:00
PathIdentificationTest.php Add identification section to config, refactor static properties 2022-10-01 20:01:18 +02:00
Pest.php Refactor tests to use pest() helper 2022-07-23 01:16:50 +02:00
QueueTest.php added $this->mockConsoleOutput (#907) 2022-07-27 01:35:55 +02:00
RequestDataIdentificationTest.php Add cookie option on Initialize Tenancy by Request identification (#980) 2022-10-18 13:52:16 +02:00
ResourceSyncingTest.php get phpstan errors down from 252 to 189 2022-08-30 05:44:23 +02:00
ScopeSessionsTest.php Refactor tests to use pest() helper 2022-07-23 01:16:50 +02:00
SingleDatabaseTenancyTest.php fix #854 2022-10-01 17:59:33 +02:00
SubdomainTest.php phpstan, global_cache, resolver improvements, InitializationHelpers trait 2022-09-29 02:47:13 +02:00
TenantAssetTest.php Add identification section to config, refactor static properties 2022-10-01 20:01:18 +02:00
TenantAwareCommandTest.php Refactor tests to use pest() helper 2022-07-23 01:16:50 +02:00
TenantDatabaseManagerTest.php [4.x] Use a dedicated DB connection for creating/deleting tenant databases (#946) 2022-10-31 12:13:54 +01:00
TenantModelTest.php Add current() and currentOrFail() tenant methods (#970) 2022-10-11 10:33:32 +02:00
TenantUserImpersonationTest.php [4.x] Make impersonation tokens require stateful guards (#935) 2022-09-02 17:46:27 +02:00
TestCase.php Add identification section to config, refactor static properties 2022-10-01 20:01:18 +02:00
UniversalRouteTest.php Refactor tests to use pest() helper 2022-07-23 01:16:50 +02:00