This commit is contained in:
@@ -31,6 +31,47 @@ final class DemoanlageBootstrapTest extends TestCase
|
||||
self::assertStringContainsString('12:30', $html);
|
||||
}
|
||||
|
||||
public function testDiagrammStelltMehrereZeitreihenDar(): void
|
||||
{
|
||||
$html = enelixDemoRenderChart(
|
||||
'Leistungsverlauf',
|
||||
[
|
||||
['name' => 'PV', 'color' => '#f4c542', 'values' => [
|
||||
['time' => 100, 'value' => 1000.0],
|
||||
['time' => 200, 'value' => 3000.0],
|
||||
]],
|
||||
['name' => 'Netz', 'color' => '#e95d5d', 'values' => [
|
||||
['time' => 100, 'value' => -500.0],
|
||||
['time' => 200, 'value' => 500.0],
|
||||
]],
|
||||
],
|
||||
'W',
|
||||
100,
|
||||
200
|
||||
);
|
||||
|
||||
self::assertStringContainsString('<svg', $html);
|
||||
self::assertStringContainsString('Leistungsverlauf', $html);
|
||||
self::assertStringContainsString('PV', $html);
|
||||
self::assertStringContainsString('Netz', $html);
|
||||
self::assertSame(2, substr_count($html, '<polyline'));
|
||||
}
|
||||
|
||||
public function testNativeEnergieflussKnotenHatVollstaendigesSchema(): void
|
||||
{
|
||||
self::assertSame([
|
||||
'VariableConfigType' => 0,
|
||||
'VariableID' => 12345,
|
||||
'SecondaryVariableID' => 0,
|
||||
'Name' => 'PV-Anlage',
|
||||
'Type' => 'solar',
|
||||
'Grouped' => false,
|
||||
'CalculationType' => 0,
|
||||
'InfoVariableID' => 54321,
|
||||
'Invert' => false,
|
||||
], enelixDemoEnergyNode(12345, 'PV-Anlage', 'solar', 54321));
|
||||
}
|
||||
|
||||
public function testRollbackIstExplizitBestaetigungspflichtig(): void
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
|
||||
Reference in New Issue
Block a user