save(); $tenant2 = Tenant::new()->save(); \Artisan::call('tenants:migrate', [ '--tenants' => [$tenant1['id'], $tenant2['id']], ]); $this->artisan('user:add') ->assertExitCode(1); tenancy()->initializeTenancy($tenant1); $this->assertNotEmpty(\DB::table('users')->get()); tenancy()->end(); tenancy()->initializeTenancy($tenant2); $this->assertNotEmpty(\DB::table('users')->get()); tenancy()->end(); } }