This commit is contained in:
@@ -29,14 +29,14 @@ final class WarmwassererwaermerModulstrukturTest extends TestCase
|
||||
self::assertMatchesRegularExpression('/^\{[0-9A-F-]{36}\}$/', $metadaten['id']);
|
||||
}
|
||||
|
||||
public function testAlle19PropertiesSindRegistriertUndImFormularDokumentiert(): void
|
||||
public function testAlle21PropertiesSindRegistriertUndImFormularDokumentiert(): 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(19, $properties);
|
||||
self::assertCount(21, $properties);
|
||||
|
||||
$formular = (string) file_get_contents(self::MODULPFAD . 'form.json');
|
||||
foreach ($properties as $property) {
|
||||
@@ -136,6 +136,38 @@ final class WarmwassererwaermerModulstrukturTest extends TestCase
|
||||
self::assertStringContainsString('Mindesttemperatur < Maximaltemperatur', $inhalt);
|
||||
}
|
||||
|
||||
public function testTemperaturstoergrenzenSindKonfigurierbarUndVonSollwertenGetrennt(): void
|
||||
{
|
||||
$inhalt = (string) file_get_contents(self::MODULPFAD . 'module.php');
|
||||
self::assertStringContainsString(
|
||||
"RegisterPropertyFloat('TemperaturUntergrenze', 0.0)",
|
||||
$inhalt
|
||||
);
|
||||
self::assertStringContainsString(
|
||||
"RegisterPropertyFloat('TemperaturObergrenze', 100.0)",
|
||||
$inhalt
|
||||
);
|
||||
self::assertStringContainsString("ReadPropertyFloat('TemperaturUntergrenze')", $inhalt);
|
||||
self::assertStringContainsString("ReadPropertyFloat('TemperaturObergrenze')", $inhalt);
|
||||
self::assertStringContainsString("'Kennung' => 'Untertemperatur'", $inhalt);
|
||||
self::assertStringContainsString("'Kennung' => 'Uebertemperatur'", $inhalt);
|
||||
|
||||
$formular = json_decode(
|
||||
(string) file_get_contents(self::MODULPFAD . 'form.json'),
|
||||
true,
|
||||
512,
|
||||
JSON_THROW_ON_ERROR
|
||||
);
|
||||
$erweitert = array_values(array_filter(
|
||||
$formular['elements'],
|
||||
static fn (array $element): bool =>
|
||||
$element['caption'] === 'Erweiterte Speichereinstellungen'
|
||||
));
|
||||
self::assertCount(1, $erweitert);
|
||||
self::assertContains('TemperaturUntergrenze', array_column($erweitert[0]['items'], 'name'));
|
||||
self::assertContains('TemperaturObergrenze', array_column($erweitert[0]['items'], 'name'));
|
||||
}
|
||||
|
||||
public function testSchaltfolgeIstBreakBeforeMake(): void
|
||||
{
|
||||
$inhalt = (string) file_get_contents(self::MODULPFAD . 'module.php');
|
||||
|
||||
Reference in New Issue
Block a user