Verbrauchermodule und betriebsartabhängige Angebote ergänzen
Tests / test (push) Successful in 42s

This commit is contained in:
dh
2026-09-21 18:46:17 +00:00
parent 7b6d1b2f07
commit 3c71626b5f
46 changed files with 4513 additions and 311 deletions
+64 -1
View File
@@ -62,7 +62,7 @@ final class DemoanlageBootstrapTest extends TestCase
self::assertSame([
'VariableConfigType' => 0,
'VariableID' => 12345,
'SecondaryVariableID' => 0,
'SecondaryVariableID' => 1,
'Name' => 'PV-Anlage',
'Type' => 'solar',
'Grouped' => false,
@@ -70,6 +70,69 @@ final class DemoanlageBootstrapTest extends TestCase
'InfoVariableID' => 54321,
'Invert' => false,
], enelixDemoEnergyNode(12345, 'PV-Anlage', 'solar', 54321));
self::assertSame(
1,
enelixDemoEnergyNode(12345, 'PV-Anlage', 'solar')['InfoVariableID']
);
}
public function testNativeDiagrammDatenreiheHatSymconFormat(): void
{
self::assertSame([
'variableID' => 12345,
'fillColor' => 'clear',
'strokeColor' => '#f4c542',
'timeOffset' => 0,
'visible' => true,
'title' => 'PV',
'type' => 'line',
'side' => 'left',
'profile' => '~Power',
], enelixDemoChartDataset(12345, 'PV', '#f4c542', '~Power'));
}
public function testDashboardVerwendetNativeEnergieverteilungUndNeueBoilerlisten(): void
{
$source = file_get_contents(dirname(__DIR__) . '/examples/Demoanlage/bootstrap.php');
self::assertIsString($source);
self::assertStringContainsString("IPS_SetHidden(\$legacyFlow, true);", $source);
self::assertStringContainsString("'EnergieverteilungNativ'", $source);
self::assertStringContainsString(
'enelixDemoConfigureVisualization($root, $energyDistribution);',
$source
);
self::assertStringContainsString('ENELIX_DEMO_DUMMY_MODULE', $source);
self::assertStringContainsString("'Boiler1Liste'", $source);
self::assertStringContainsString("'Boiler2Liste'", $source);
self::assertStringContainsString("'EnergieflussPVkW'", $source);
self::assertStringContainsString("'~Power'", $source);
self::assertStringContainsString("'~Electricity'", $source);
self::assertStringContainsString(
"enelixDemoEnergyNode(\$flowPv, 'PV-Anlage', 'solar')",
$source
);
self::assertStringContainsString(
"enelixDemoEnergyNode(\$flowBase, 'Haus-Grundlast', 'consumer')",
$source
);
self::assertStringContainsString(
"enelixDemoEnergyNode(\$flowDryer, 'Entfeuchter', 'consumer')",
$source
);
self::assertStringContainsString(
"enelixDemoEnsureChart(\$history, 'LeistungsdiagrammNativ'",
$source
);
self::assertStringContainsString('IPS_SetHidden($powerChart, true);', $source);
self::assertStringContainsString(
"enelixDemoLinkInstanceVariables(\$boiler1List, \$boiler1, \$temp1);",
$source
);
self::assertStringContainsString(
"foreach (['Boiler1Link', 'Boiler2Link'] as \$oldLinkIdent)",
$source
);
}
public function testRollbackIstExplizitBestaetigungspflichtig(): void