make(Kernel::class)->bootstrap(); if ( ! $app->environment('testing') || config('database.default') !== 'sqlite' || config('database.connections.sqlite.database') !== ':memory:' ) { throw new RuntimeException('测试环境未使用内存 SQLite,已拒绝执行以保护共享数据库。'); } return $app; } }