This commit is contained in:
@@ -145,6 +145,25 @@ return static function (TestContext $test): void {
|
||||
|
||||
return is_array($daten) ? $daten : [];
|
||||
};
|
||||
$lizenzInstallationID = static function () use ($test, $managerId): string {
|
||||
$formular = IPS_GetConfigurationForm($managerId);
|
||||
if (preg_match(
|
||||
'/Installations-ID: ([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/i',
|
||||
$formular,
|
||||
$treffer
|
||||
) !== 1) {
|
||||
$test->fail('Das Manager-Formular enthaelt keine gueltige Installations-ID.');
|
||||
}
|
||||
|
||||
return strtolower($treffer[1]);
|
||||
};
|
||||
$test->runCase('Installations-ID bleibt bei ApplyChanges stabil', static function (
|
||||
TestContext $test
|
||||
) use ($managerId, $lizenzInstallationID): void {
|
||||
$vorher = $lizenzInstallationID();
|
||||
IPS_ApplyChanges($managerId);
|
||||
$test->assertSame($vorher, $lizenzInstallationID());
|
||||
});
|
||||
$zustandswert = static function (array $daten, int $instanzId, string $kennung) {
|
||||
foreach ($daten['Verbraucher'] ?? [] as $verbraucher) {
|
||||
if (($verbraucher['InstanzID'] ?? 0) !== $instanzId) {
|
||||
|
||||
Reference in New Issue
Block a user