in(__DIR__); function withTenantDatabases(bool $migrate = false) { Event::listen(TenantCreated::class, JobPipeline::make($migrate ? [CreateDatabase::class] : [CreateDatabase::class, MigrateDatabase::class] )->send(function (TenantCreated $event) { return $event->tenant; })->toListener()); } function withCacheTables() { Schema::create('cache', function (Blueprint $table) { $table->string('key')->primary(); $table->mediumText('value'); $table->integer('expiration'); }); Schema::create('cache_locks', function (Blueprint $table) { $table->string('key')->primary(); $table->string('owner'); $table->integer('expiration'); }); } function pest(): TestCase { return \Pest\TestSuite::getInstance()->test; }