30 lines
1.1 KiB
PHP
30 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Belevo\EnelixEMS\Tests;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
require_once __DIR__ . '/../libs/NetzfahrplanV4Betriebsdaten.php';
|
|
require_once __DIR__ . '/fixtures/NativeV4Scenarios.php';
|
|
|
|
final class NetzfahrplanV4BetriebsdatenTest extends TestCase
|
|
{
|
|
public function testOfflineInputScenarios(): void
|
|
{
|
|
self::assertCount(24, NativeV4Scenarios::run());
|
|
}
|
|
|
|
public function testSenderCannotChangeLivePlanOrActuators(): void
|
|
{
|
|
$source = file_get_contents(__DIR__ . '/../libs/ManagerNetzfahrplanV4Trait.php');
|
|
foreach (['sendeManagerdaten(', 'aktualisiereNetzfahrplan(', '->regeln(', '->SetStatus(', "WriteAttributeString('Netzfahrplan',"] as $forbidden) {
|
|
self::assertStringNotContainsString($forbidden, $source);
|
|
}
|
|
self::assertStringContainsString("RegisterPropertyBoolean('NetzfahrplanV4SchattenAktiv', false)", $source);
|
|
self::assertStringContainsString('/prognosis/planner-v4/operation', $source);
|
|
self::assertStringNotContainsString('/prognosis/schedule', $source);
|
|
}
|
|
}
|