feat: full anonymization of buspro xml dumps

This commit is contained in:
Björn Fromme
2026-06-21 16:49:54 +02:00
parent d77f92b6f0
commit 52ee6b26b1
6 changed files with 922 additions and 85 deletions
+9 -1
View File
@@ -41,7 +41,10 @@ class DbAnonymizeCommandTest extends TestCase
$tester->execute([]);
self::assertSame(Command::SUCCESS, $tester->getStatusCode());
self::assertStringContainsString('Anonymized 1 users, 2 newsletter consents, 3 newsletter opt-in requests, and 4 booking drafts.', $tester->getDisplay());
self::assertStringContainsString(
'Anonymized 1 users, 2 newsletter consents, 3 newsletter opt-in requests, and 4 booking drafts.',
$this->normalizeConsoleOutput($tester->getDisplay()),
);
}
private function createCommand(DatabaseAnonymizer $anonymizer, string $environment): DbAnonymizeCommand
@@ -52,4 +55,9 @@ class DbAnonymizeCommandTest extends TestCase
$environment,
);
}
private function normalizeConsoleOutput(string $output): string
{
return trim((string) preg_replace('/\s+/', ' ', $output));
}
}