From 6fb8838d3368a2e0072ea7ed45c208b0b6f0906e Mon Sep 17 00:00:00 2001 From: lukinovec Date: Wed, 26 Oct 2022 11:46:39 +0200 Subject: [PATCH] Remove the tenantSchemaPath helper --- tests/CommandsTest.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/CommandsTest.php b/tests/CommandsTest.php index 9303cde0..ea973070 100644 --- a/tests/CommandsTest.php +++ b/tests/CommandsTest.php @@ -26,7 +26,7 @@ use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper; beforeEach(function () { - if (file_exists($schemaPath = tenantSchemaPath())) { + if (file_exists($schemaPath = database_path('schema/tenant-schema.dump'))) { unlink($schemaPath); } @@ -58,11 +58,6 @@ afterEach(function () { } }); -function tenantSchemaPath(): string -{ - return database_path('schema/tenant-schema.dump'); -} - test('migrate command doesnt change the db connection', function () { expect(Schema::hasTable('users'))->toBeFalse(); @@ -130,7 +125,7 @@ test('dump command works', function () { }); test('tenant dump file gets created as tenant-schema.dump in the database schema folder by default', function() { - config(['tenancy.migration_parameters.--schema-path' => $schemaPath = tenantSchemaPath()]); + config(['tenancy.migration_parameters.--schema-path' => $schemaPath = database_path('schema/tenant-schema.dump')]); $tenant = Tenant::create(); Artisan::call('tenants:migrate');