6 lines
1.4 KiB
PHP
6 lines
1.4 KiB
PHP
<?php require __DIR__.'/boot-QA.php';
|
|
use Illuminate\Support\Facades\DB;
|
|
$p=json_decode(file_get_contents(__DIR__.'/PROVA-DELTA-QA.json'),true);$desk=app(App\Services\VirtualDesk::class);$path=app(App\Services\InvestorPath::class);$fin=app(App\Services\FintechInvestment::class);$out=[];
|
|
foreach($p['scenarios']as$s){$actor=App\Models\User::findOrFail($s['user_id']);$view=$path->view($actor,$s['id']);$profile=$view['fintech']['record']['profile'];$profile['activities']['payments']=$s['scenario']==='A'?'no':'yes';$fin->save($actor,$s['id'],['version'=>$view['case']['version'],'profile'=>$profile]);$view=$path->view($actor,$s['id']);$out[]=[...$s,'version'=>$view['case']['version'],'profile_sha256'=>$view['fintech']['record']['sha256'],'profile'=>$view['fintech']['record']['profile'],'requirements'=>$view['fintech']['requirements'],'exercise_note'=>'Histórico do ensaio de alteração material preservado; A restituído a fornecedor tecnológico, B a pagamentos declarados. Nenhum ato externo.'];}
|
|
file_put_contents(__DIR__.'/CENARIOS-FINAIS-QA.json',json_encode(['result'=>'passed','scenarios'=>$out,'synthetic_document_restored'=>DB::table('documents')->where('id',$p['scenarios'][0]['document_id'])->whereNull('deleted_at')->exists()],JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_THROW_ON_ERROR));echo json_encode(['final_scenarios'=>2,'material_change_history_preserved'=>true,'active_changes'=>0]);
|