Files
Investidor-V2/tools/business-wizard-browser-seed.php
nala 3dc7c5c649
tests / ci (push) Canceled after 0s
commit 30/9
2026-09-30 09:05:43 +02:00

21 lines
899 B
PHP

<?php
use App\Models\User;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
require __DIR__.'/../vendor/autoload.php';
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
$db = DB::connection();
if (! $app->environment('testing') || $db->getDatabaseName() !== 'portal_services_test' || (string) $db->getConfig('port') !== '55441') {
throw new RuntimeException('Isolated QA required');
}
$user = User::firstOrCreate(['email' => 'mne-browser@example.test'], [
'name' => 'Synthetic MNE browser', 'password' => Hash::make('SyntheticMneOnly-2026!'),
]);
$user->forceFill(['email_verified_at' => now()])->save();
$db->table('sectors')->updateOrInsert(['slug' => 'wizard-browser-synthetic'], ['name' => 'Synthetic wizard sector', 'is_active' => true]);
echo "Synthetic isolated fixture ready\n";