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'));