Files
Enelix-EMS/tests/DemoanlageBootstrapTest.php
T
dh 312b76aee5
Tests / test (push) Successful in 42s
Add interactive Enelix demo system
2026-09-17 13:41:46 +00:00

42 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase;
require_once dirname(__DIR__) . '/examples/Demoanlage/bootstrap.php';
final class DemoanlageBootstrapTest extends TestCase
{
public function testEnergieflussEnthaeltAlleAnlagenteile(): void
{
$html = enelixDemoRenderFlow([
'hour' => 12.5,
'pv' => 6500.0,
'base' => 900.0,
'grid' => -800.0,
'boiler1' => 2400,
'boiler2' => 1500,
'dryer' => 900,
'temp1' => 51.2,
'temp2' => 48.7,
'manager' => 'PV',
]);
self::assertStringContainsString('Enelix 2 Energiefluss', $html);
self::assertStringContainsString('Boiler 1', $html);
self::assertStringContainsString('Boiler 2', $html);
self::assertStringContainsString('Entfeuchter', $html);
self::assertStringContainsString('Einspeisung', $html);
self::assertStringContainsString('12:30', $html);
}
public function testRollbackIstExplizitBestaetigungspflichtig(): void
{
$this->expectException(RuntimeException::class);
$this->expectExceptionMessage('Rollback nur mit');
enelixDemoRemove();
}
}