32 lines
868 B
PHP
32 lines
868 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Belevo\EnelixUtils\SymconTest\TestContext;
|
|
|
|
return static function (TestContext $test): void {
|
|
$moduleId = $test->createInstance(
|
|
'{5B2A199B-2226-411F-B83B-FC1CBA58496B}',
|
|
'Virtuelle Batterie'
|
|
);
|
|
|
|
$test->runCase('Konfigurationsformular ist gueltiges JSON', static function (
|
|
TestContext $test
|
|
) use ($moduleId): void {
|
|
$form = json_decode(
|
|
IPS_GetConfigurationForm($moduleId),
|
|
true,
|
|
512,
|
|
JSON_THROW_ON_ERROR
|
|
);
|
|
$test->assertTrue(is_array($form));
|
|
});
|
|
|
|
$test->runCase('Sichere Startkonfiguration ist inaktiv', static function (
|
|
TestContext $test
|
|
) use ($moduleId): void {
|
|
$aktivId = IPS_GetObjectIDByIdent('Aktiv', $moduleId);
|
|
$test->assertSame(false, GetValue($aktivId));
|
|
});
|
|
};
|