From f9a819215f7350bc3aec869cf7da687cd53bfcbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 26 Feb 2019 23:07:01 +0100 Subject: [PATCH] wip --- tests/CommandsTest.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/CommandsTest.php b/tests/CommandsTest.php index 6b88ce7a..a52f1663 100644 --- a/tests/CommandsTest.php +++ b/tests/CommandsTest.php @@ -45,17 +45,19 @@ class CommandsTest extends TestCase { // connection is sqlite dump(Schema::getConnection()->getName()); - - $tenant = tenant()->create('test.localhost'); - Artisan::call('tenants:migrate', [ - '--tenants' => [$tenant['uuid']] - ]); + + tenancy()->init('localhost'); // reconnect the DB // connection should be tenant at this point. is still sqlite dump(Schema::getConnection()->getName()); // if you remove line 47, connection will be tenant at this point dd('stop'); + $tenant = tenant()->create('test.localhost'); + Artisan::call('tenants:migrate', [ + '--tenants' => [$tenant['uuid']] + ]); + $this->assertFalse(Schema::hasTable('users')); tenancy()->init('localhost'); $this->assertFalse(Schema::hasTable('users'));