fix(compat): preserve PHP 8.0 support without changing control guards
Tests / test (push) Successful in 59s
Tests / test (push) Successful in 59s
Replace trait constants and array_is_list usage with equivalent PHP 8.0 constructs. Add strict list/expiry regressions and make isolated reflection tests PHP 8.0 compatible. No control activation, threshold or configuration change.
This commit is contained in:
@@ -210,6 +210,9 @@ namespace {
|
||||
$bad=$r;$bad['controlledTrial']['acceptEstimatedPeak']=false;rejects(fn()=>Gate::befehl($bad,$op,['b'=>0.],$local,$now,$now),'peak uncertainty needs explicit acceptance');
|
||||
[$m,$b]=activeFixture();$m->V4ManagerAktivtestSchalten(true);
|
||||
check($m->active()&&$b->active()&&$m->vars['NetzfahrplanV4Aktivtest'],'single runtime switch starts bounded active test');
|
||||
$activeSession=json_decode($m->buf['V4ManagerTrialSession'],true);
|
||||
check($activeSession['actuatorWatchdogEvidenceId']==='explicit_test_plant_watchdog_waiver',
|
||||
'active session retains exact explicit watchdog waiver identifier');
|
||||
$allocation=tick($m);
|
||||
check(end($b->writes)===3000&&!isset($allocation['Sollwerte'][44234]),'active test uses guarded command path');
|
||||
check($m->command()['executionMeaning']==='explicit_time_boxed_test_plant_operation','active command is explicitly distinguished');
|
||||
@@ -231,6 +234,19 @@ namespace {
|
||||
check($m->active()&&$b->active(),'local active authority refreshes while plan and measurements remain valid');
|
||||
$m->V4ManagerAktivtestSchalten(false);
|
||||
check(!$m->active()&&!$b->active()&&!$m->vars['NetzfahrplanV4Aktivtest']&&end($b->writes)===0,'switch off revokes session and requests zero');
|
||||
[$m,$b]=activeFixture();
|
||||
$m->attrs['NetzfahrplanV4AktivtestBeginn']=$clock-172800;
|
||||
$m->attrs['NetzfahrplanV4AktivtestEnde']=$clock;
|
||||
rejects(fn()=>$m->V4ManagerAktivtestSchalten(true),'active window rejects its exact expiry boundary');
|
||||
check($m->attrs['NetzfahrplanV4AktivtestBeginn']===$clock-172800
|
||||
&&$m->attrs['NetzfahrplanV4AktivtestEnde']===$clock&&!$m->active()&&!$b->active(),
|
||||
'expired active window is never renewed or armed');
|
||||
[$m,$b]=activeFixture();
|
||||
$m->attrs['NetzfahrplanV4AktivtestBeginn']=$clock-1;
|
||||
$m->attrs['NetzfahrplanV4AktivtestEnde']=$clock+172800;
|
||||
rejects(fn()=>$m->V4ManagerAktivtestSchalten(true),'active window rejects even one second beyond 48 hours');
|
||||
check($b->writes===[]&&!$m->active()&&!$b->active(),
|
||||
'oversized active window cannot cause register writes or arm either session');
|
||||
[$m,$b]=activeFixture();$m->props['NetzfahrplanV4WatchdogVerzichtErlaubt']=false;
|
||||
rejects(fn()=>$m->V4ManagerAktivtestSchalten(true),'active test requires explicit watchdog waiver property');
|
||||
[$m,$b]=activeFixture();$b->props['NetzfahrplanV4WatchdogVerzichtErlaubt']=false;
|
||||
|
||||
Reference in New Issue
Block a user