Files
Investidor-V2/outputs/investmoz-editorial-QA-20261018/fixture-QA.php
T
nala cf003c8623
tests / ci (push) Canceled after 0s
versao nrgocios 4
2026-10-18 15:57:06 +02:00

19 lines
1.3 KiB
PHP

<?php
require __DIR__.'/boot-QA.php';
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Crypt;
if($target!==['database'=>'editorial_20261018_test','port'=>55441])throw new RuntimeException('QA only');
$private='C:/Users/macbook/.config/investmoz/editorial-QA-20261018';
$actors=[];
foreach(['authorized','unprivileged'] as $role){
$a=$role==='authorized'?App\Models\User::findOrFail(2):new App\Models\User;
$a->name=$role==='authorized'?'Gestor editorial QA':'Leitor QA sem gestão';
$a->email=$role==='authorized'?'gestor-editorial-qa@example.invalid':'leitor-editorial-qa@example.invalid';
$a->password='QA-editorial-sintetico-20261018!';$a->email_verified_at=now();
$secret='JBSWY3DPEHPK3PXPJBSWY3DPEHPK3PXP';
$a->two_factor_secret=Crypt::encrypt($secret);$a->two_factor_recovery_codes=Crypt::encrypt('[]');$a->two_factor_confirmed_at=now();$a->save();
$actors[$role]=['id'=>$a->id,'email'=>$a->email,'password'=>'QA-editorial-sintetico-20261018!','secret'=>$secret];
}
file_put_contents($private.'/fixture-private.json',json_encode(['url'=>'http://127.0.0.1:18548','database'=>$target['database'],'actors'=>$actors]));
echo json_encode(['target'=>$target,'actors'=>'synthetic manager and reader; normal authentication and MFA; no new product roles','scanner'=>app(App\Services\Malware\MalwareScanner::class)->health()]).PHP_EOL;