Files
Investidor-V2/outputs/investmoz-navegacao-consolidacao-QA-20261016/inspect-runtime.php
T
nala cef6e201c7
tests / ci (push) Canceled after 0s
versao nrgocios 2
2026-10-16 20:11:05 +02:00

12 lines
1.4 KiB
PHP

<?php
require __DIR__.'/boot-QA.php';
use Illuminate\Support\Facades\DB;
$fixture=json_decode(file_get_contents('C:/Users/macbook/.config/investmoz/navegacao-consolidacao-QA-20261016/fixture-private.json'),true);
$a=$fixture['actors']['owner'];$actor=App\Models\User::where('email',$a['email'])->firstOrFail();
$path=app(App\Services\InvestorPath::class);$cases=$path->contexts($actor);$views=[];
foreach($cases as$c){$v=$path->view($actor,$c['id']);$r=app(App\Services\VirtualDesk::class)->case($actor,$c['id']);$views[]=['case'=>$v['case'],'simulation_id'=>$r->simulation_id,'requests'=>$v['requests'],'results'=>count($v['results']),'services'=>$v['services']];}
$services=DB::table('desk_service_versions')->where('status','published')->orderByDesc('version')->get(['id','code','version','definition'])->unique('code')->values();foreach($services as$s)$s->definition=json_decode($s->definition,true);
$geo=app(App\Services\InvestmentGeography::class)->publicReferences()->whereIn('location_type',['province','locality'])->orderBy('name')->limit(20)->get(['id','name','location_type']);
$data=['contexts'=>$views,'options'=>app(App\Services\InvestorContext::class)->options(),'services'=>$services,'geography'=>$geo];
file_put_contents(__DIR__.'/RUNTIME-QA.json',json_encode($data,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE));echo json_encode(['cases'=>count($views),'services'=>count($services),'isolated'=>$target]);