This commit is contained in:
@@ -70,6 +70,8 @@ final class ManagerModulstrukturTest extends TestCase
|
||||
'PrognoseHausverbrauchVariableID',
|
||||
'PrognoseSOCVariableID',
|
||||
'PrognoseSendeintervall',
|
||||
'StoerueberwachungAktiv',
|
||||
'StoerungsSendeintervall',
|
||||
] as $property) {
|
||||
self::assertStringContainsString($property, $json);
|
||||
}
|
||||
@@ -201,7 +203,7 @@ final class ManagerModulstrukturTest extends TestCase
|
||||
self::assertStringContainsString("'issueDeviceToken' =>", $inhalt);
|
||||
self::assertStringContainsString("unset(\$neueLease['deviceToken'])", $inhalt);
|
||||
self::assertStringContainsString(
|
||||
"\$geraetezugangFehlt = (\$this->hatAnlagentopologie() || \$this->prognoseTelemetrieKonfiguriert())",
|
||||
"|| \$this->ReadPropertyBoolean('StoerueberwachungAktiv'))",
|
||||
$inhalt
|
||||
);
|
||||
self::assertStringContainsString(
|
||||
@@ -237,6 +239,34 @@ final class ManagerModulstrukturTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testManagerUebertraegtStoerungsvollsnapshotsMitRetry(): void
|
||||
{
|
||||
$inhalt = (string) file_get_contents(__DIR__ . '/../Manager/module.php');
|
||||
|
||||
self::assertFileExists(__DIR__ . '/../libs/StoerungsSnapshot.php');
|
||||
self::assertStringContainsString(
|
||||
'https://license.enelix.ch/api/v1/installations/%s/faults',
|
||||
$inhalt
|
||||
);
|
||||
foreach ([
|
||||
"RegisterPropertyBoolean('StoerueberwachungAktiv', false)",
|
||||
"RegisterPropertyInteger('StoerungsSendeintervall', 300)",
|
||||
"RegisterAttributeString('StoerungsSnapshot', '{}')",
|
||||
"RegisterAttributeString('StoerungsGesendeterHash', '')",
|
||||
"RegisterAttributeInteger('StoerungsNaechsterVersuch', 0)",
|
||||
"'StoerungenSenden',",
|
||||
'StoerungsSnapshot::erstellen(',
|
||||
'StoerungsSnapshot::zustandHash(',
|
||||
"CURLOPT_CUSTOMREQUEST => 'PUT'",
|
||||
] as $erwartet) {
|
||||
self::assertStringContainsString($erwartet, $inhalt);
|
||||
}
|
||||
self::assertStringNotContainsString(
|
||||
'"name":"StoermeldeAnschluss"',
|
||||
str_replace(' ', '', (string) file_get_contents(__DIR__ . '/../Manager/form.json'))
|
||||
);
|
||||
}
|
||||
|
||||
public function testManagerRegeltDieAnlagenweiteEinspeisegrenzeUndDenNetzfahrplan(): void
|
||||
{
|
||||
$inhalt = (string) file_get_contents(__DIR__ . '/../Manager/module.php');
|
||||
|
||||
Reference in New Issue
Block a user