fix(battery): keep native timer callbacks reload-safe
Tests / test (push) Failing after 53s

This commit is contained in:
dh
2026-10-08 05:15:27 +00:00
parent 5885681669
commit d42cfb3342
10 changed files with 535 additions and 6 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace Belevo\EnelixEMS\Tests;
use PHPUnit\Framework\TestCase;
final class BatterieTimerLifecycleTest extends TestCase
{
/**
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function testTimerWrapperUndStriktPassiverRueckmeldecache(): void
{
global $count;
ob_start();
try {
require __DIR__ . '/BatterieTimer/lifecycle_checks.php';
$output = (string) ob_get_contents();
} finally {
ob_end_clean();
}
self::assertSame(28, $count);
self::assertSame(0, $GLOBALS['deviceCalls']);
self::assertStringContainsString('TOTAL 28 offline battery timer/cache contract checks passed.', $output);
}
}