1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 17:54:03 +00:00

Merge branch 'master' into 515-complete

This commit is contained in:
Samuel Štancl 2022-10-25 12:54:21 +02:00
commit b3902bcf29
34 changed files with 453 additions and 144 deletions

View file

@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Str;
use Stancl\JobPipeline\JobPipeline;
use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper;
use Stancl\Tenancy\Database\Contracts\StatefulTenantDatabaseManager;
use Stancl\Tenancy\Database\DatabaseManager;
use Stancl\Tenancy\Events\TenancyEnded;
use Stancl\Tenancy\Events\TenancyInitialized;
@ -37,7 +38,10 @@ test('databases can be created and deleted', function ($driver, $databaseManager
$name = 'db' . pest()->randomString();
$manager = app($databaseManager);
$manager->setConnection($driver);
if ($manager instanceof StatefulTenantDatabaseManager) {
$manager->setConnection($driver);
}
expect($manager->databaseExists($name))->toBeFalse();