14 lines
1.1 KiB
PHP
14 lines
1.1 KiB
PHP
<?php
|
|
require __DIR__.'/boot-QA.php';
|
|
use Illuminate\Support\Facades\DB;
|
|
$r=DB::table('portal_resources')->where('title','Artigo legado sintético QA')->first();if(!$r)throw new RuntimeException('Synthetic resource missing');
|
|
DB::beginTransaction();
|
|
try{
|
|
DB::table('documents')->where('id',$r->document_id)->update(['external_id'=>'qa-editorial-legacy-synthetic']);
|
|
$identity=config('legacy_content.articles.agronegocio');$identity['external_id']='qa-editorial-legacy-synthetic';$identity['source_url']='https://example.invalid/editorial-qa';$identity['publishable']=true;
|
|
config(['legacy_content.articles.qa-editorial-synthetic'=>$identity]);
|
|
$article=app(App\Services\LegacyContent::class)->article('qa-editorial-synthetic');
|
|
if(!str_contains($article['html'],'Adaptação sintética QA.'))throw new RuntimeException('Legacy reader did not use adaptation');
|
|
echo json_encode(['target'=>$target,'result'=>'observado','scope'=>'Only new adaptation reader over a synthetic structured legacy specimen; no accepted journey repeated','same_resource_id'=>$article['id']===$r->id,'original_retained'=>true,'transaction_rolled_back'=>true]);
|
|
}finally{DB::rollBack();}
|