This commit is contained in:
@@ -7,6 +7,7 @@ return [
|
||||
'file' => __DIR__ . '/modules/Manager.php',
|
||||
'paths' => [
|
||||
'Manager/*',
|
||||
'libs/Lizenzpruefung.php',
|
||||
'libs/ManagerRegler.php',
|
||||
'libs/ManagerSchnittstelle.php',
|
||||
'libs/Nachrichtenvertrag.php',
|
||||
|
||||
@@ -48,11 +48,13 @@ return static function (TestContext $test): void {
|
||||
['InstanzID' => $einStufigId, 'Aktiv' => true],
|
||||
['InstanzID' => $warmwasserId, 'Aktiv' => true],
|
||||
];
|
||||
$lizenzcode = trim((string) getenv('ENELIX_TEST_LICENSE_CODE'));
|
||||
$managerId = $test->createInstance(
|
||||
'{6F771B18-59D4-4C8A-B951-3B2FE9F6A2C4}',
|
||||
'Manager',
|
||||
[
|
||||
'NetzleistungVariableID' => $netzleistungId,
|
||||
'Lizenzcode' => $lizenzcode,
|
||||
'AutomatischeSuche' => false,
|
||||
'VerbraucherZuordnung' => json_encode($zuordnung, JSON_THROW_ON_ERROR),
|
||||
'KeepAlive' => 30,
|
||||
@@ -130,6 +132,22 @@ return static function (TestContext $test): void {
|
||||
return null;
|
||||
};
|
||||
|
||||
if ($lizenzcode === '') {
|
||||
$test->runCase('Manager bleibt ohne Lizenz sicher gesperrt', static function (
|
||||
TestContext $test
|
||||
) use ($managerId): void {
|
||||
IPS_RequestAction($managerId, 'Aktiv', true);
|
||||
IPS_RequestAction($managerId, 'Regeln', true);
|
||||
$test->assertInstanceStatus($managerId, 203);
|
||||
$test->assertSame(
|
||||
'Inaktiv',
|
||||
GetValue($test->objectByIdent('Betriebsart', $managerId))
|
||||
);
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$test->runCase('Manager und alle vorhandenen Verbrauchertypen sind verknüpft', static function (
|
||||
TestContext $test
|
||||
) use ($managerId, $einStufigId, $warmwasserId, $melden): void {
|
||||
|
||||
Reference in New Issue
Block a user