feat: Lizenzkontingente im Manager durchsetzen

This commit is contained in:
dh
2026-09-22 14:43:36 +00:00
parent 7845c66fd8
commit 2392a9c209
6 changed files with 627 additions and 31 deletions
+16 -1
View File
@@ -163,7 +163,7 @@ return static function (TestContext $test): void {
if ($lizenzcode === '') {
$test->runCase('Manager bleibt ohne Lizenz sicher gesperrt', static function (
TestContext $test
) use ($managerId): void {
) use ($managerId, $verbraucherstatus): void {
IPS_RequestAction($managerId, 'Aktiv', true);
IPS_RequestAction($managerId, 'Regeln', true);
$test->assertInstanceStatus($managerId, 203);
@@ -171,6 +171,21 @@ return static function (TestContext $test): void {
'Inaktiv',
GetValue($test->objectByIdent('Betriebsart', $managerId))
);
$daten = $verbraucherstatus();
$test->assertSame(false, $daten['Synchronisiert'] ?? null);
$test->assertSame(3, count($daten['NichtGeregelt'] ?? []));
foreach ($daten['NichtGeregelt'] as $detail) {
$test->assertTrue(is_int($detail['InstanzID'] ?? null));
$test->assertTrue(is_string($detail['Name'] ?? null));
$test->assertTrue(is_string($detail['Typ'] ?? null));
$test->assertSame('Lizenz nicht freigegeben', $detail['Grund'] ?? null);
}
$detailtext = (string) GetValue(
$test->objectByIdent('NichtGeregelteGeraete', $managerId)
);
$test->assertTrue(str_contains($detailtext, 'Boiler'));
$test->assertTrue(str_contains($detailtext, 'Lizenz nicht freigegeben'));
});
return;