You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virt/web/tests/CloudMaintenanceNoticeAccou...

28 lines
985 B
PHP

<?php
$root = dirname(__DIR__);
$deletion = file_get_contents(
$root . '/app/Services/UserDataDeletionService.php'
);
$assert = static function (bool $condition, string $message): void {
if (!$condition) {
throw new RuntimeException($message);
}
};
$assert(str_contains($deletion,
"['cloud_maintenance_notice_recipients', 'user_id']")
&& str_contains($deletion,
"['cloud_maintenance_notice_instances', 'user_id']"),
'Account deletion does not remove frozen maintenance recipient data.');
$assert(str_contains($deletion,
"(string) \$recipient->status === 'sending'")
&& str_contains($deletion,
'投递中的维护通知'),
'Account deletion can erase an in-flight maintenance delivery.');
$assert(str_contains($deletion,
'$noticeService->recalculate((int) $noticeId);'),
'Account deletion does not reconcile affected notice aggregates.');
echo "Maintenance notice account-deletion contracts passed.\n";