12 lines
1.4 KiB
PHP
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]);
|