set('database.default', 'testing'); $app['config']->set('database.connections.testing', [ 'driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '', ]); // Needed by anything exercising encrypt()/decrypt() (e.g. encrypted // warehouse IDs). Harmless for the rest. $app['config']->set('app.key', 'base64:' . base64_encode(random_bytes(32))); // The suite loads the shipped migrations explicitly (see // defineDatabaseMigrations); disable the provider's auto-load so the // same migration files aren't registered from two paths. $app['config']->set('files.run_migrations', false); } protected function defineDatabaseMigrations(): void { // Host-app tables (users, articles) used as morph targets in tests. $this->loadMigrationsFrom(__DIR__ . '/../workbench/database/migrations'); // The package's actual shipped schema — the single source of truth. $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); } protected function setUp(): void { parent::setUp(); Storage::fake('local'); } }