feat(control): connect physical feedback to bounded V4 command and fallback paths

This commit is contained in:
ENELIX Agent
2026-10-03 11:40:54 +00:00
parent 8eb9688942
commit 9878197aea
24 changed files with 891 additions and 7 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace Belevo\EnelixEMS\Tests;
use PHPUnit\Framework\TestCase;
final class NetzfahrplanV4RueckmeldungTest extends TestCase
{
private function checkScript(string $name): void
{
$pipes=[];
$p=proc_open([PHP_BINARY,__DIR__.'/V4Feedback/'.$name],
[0=>['pipe','r'],1=>['pipe','w'],2=>['pipe','w']],$pipes);
self::assertIsResource($p);fclose($pipes[0]);
$out=stream_get_contents($pipes[1]);$err=stream_get_contents($pipes[2]);
fclose($pipes[1]);fclose($pipes[2]);
self::assertSame(0,proc_close($p),$out.$err);
self::assertSame('',$err);self::assertStringContainsString('TOTAL ',$out);
}
public function testPhysicalFeedback(): void {$this->checkScript('checks.php');}
public function testActualReceiverIntegration(): void {$this->checkScript('receiver_checks.php');}
public function testActualFallbackWrapper(): void {$this->checkScript('fallback_checks.php');}
public function testMessageWithoutVisibleDiagnostics(): void {$this->checkScript('message_checks.php');}
}