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

Unlink tenant schema path before each test in CommandsTest

This commit is contained in:
lukinovec 2022-10-26 09:34:20 +02:00
parent 713a1b4afc
commit ca38123d84

View file

@ -26,6 +26,10 @@ use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper;
beforeEach(function () {
if (file_exists($schemaPath = tenantSchemaPath())) {
unlink($schemaPath);
}
Event::listen(TenantCreated::class, JobPipeline::make([CreateDatabase::class])->send(function (TenantCreated $event) {
return $event->tenant;
})->toListener());
@ -136,7 +140,6 @@ test('tenant dump file gets created as tenant-schema.dump in the database schema
Artisan::call('tenants:dump');
expect($schemaPath)->toBeFile();
unlink($schemaPath);
});
test('migrate command uses the correct schema path by default', function () {