This commit is contained in:
@@ -29,14 +29,14 @@ final class WarmwassererwaermerModulstrukturTest extends TestCase
|
||||
self::assertMatchesRegularExpression('/^\{[0-9A-F-]{36}\}$/', $metadaten['id']);
|
||||
}
|
||||
|
||||
public function testAlle23PropertiesSindRegistriertUndImFormularDokumentiert(): void
|
||||
public function testAlle20PropertiesSindRegistriertUndImFormularDokumentiert(): void
|
||||
{
|
||||
$basis = (string) file_get_contents(__DIR__ . '/../libs/VerbraucherBasisTrait.php');
|
||||
$modul = (string) file_get_contents(self::MODULPFAD . 'module.php');
|
||||
preg_match_all('/RegisterProperty(?:Integer|Float|Boolean|String)\(\'([^\']+)\'/', $basis . $modul, $treffer);
|
||||
$properties = array_values(array_unique($treffer[1]));
|
||||
|
||||
self::assertCount(23, $properties);
|
||||
self::assertCount(20, $properties);
|
||||
|
||||
$formular = (string) file_get_contents(self::MODULPFAD . 'form.json');
|
||||
foreach ($properties as $property) {
|
||||
@@ -55,7 +55,7 @@ final class WarmwassererwaermerModulstrukturTest extends TestCase
|
||||
self::assertStringNotContainsString("RegisterPropertyInteger('ManagerID'", $inhalt);
|
||||
}
|
||||
|
||||
public function testZehnDiagnosevariablenSindOptionalUndLoggingIstGetrennt(): void
|
||||
public function testZehnDiagnosevariablenWerdenBedarfsgesteuertAngelegtUndGeloescht(): void
|
||||
{
|
||||
$inhalt = (string) file_get_contents(self::MODULPFAD . 'module.php');
|
||||
preg_match('/private const DIAGNOSE_VARIABLEN = \[(.*?)\];/s', $inhalt, $treffer);
|
||||
@@ -64,8 +64,30 @@ final class WarmwassererwaermerModulstrukturTest extends TestCase
|
||||
|
||||
self::assertCount(10, $variablen[1]);
|
||||
self::assertStringContainsString("ReadPropertyBoolean('DiagnosevariablenAnzeigen')", $inhalt);
|
||||
self::assertStringContainsString('registriereVerbraucherDiagnose', $inhalt);
|
||||
self::assertStringContainsString('UnregisterVariable($ident)', $inhalt);
|
||||
self::assertStringContainsString("ReadPropertyBoolean('LoggingEin')", $inhalt);
|
||||
self::assertStringContainsString("case 'LogStatus':", $inhalt);
|
||||
self::assertStringNotContainsString("case 'LogStatus':", $inhalt);
|
||||
}
|
||||
|
||||
public function testFormularIstWieGewuenschtGegliedertUndHatKeineAktionsknoepfe(): void
|
||||
{
|
||||
$formular = json_decode(
|
||||
(string) file_get_contents(self::MODULPFAD . 'form.json'),
|
||||
true,
|
||||
512,
|
||||
JSON_THROW_ON_ERROR
|
||||
);
|
||||
self::assertSame(
|
||||
[
|
||||
'Manager und Zeitverhalten',
|
||||
'Speichereinstellungen',
|
||||
'Erweiterte Speichereinstellungen',
|
||||
'Erweiterte sonstige Einstellungen',
|
||||
],
|
||||
array_column($formular['elements'], 'caption')
|
||||
);
|
||||
self::assertArrayNotHasKey('actions', $formular);
|
||||
}
|
||||
|
||||
public function testTemperatursollwerteSindGeprueftBedienbar(): void
|
||||
|
||||
Reference in New Issue
Block a user