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.
31 lines
1.2 KiB
PHP
31 lines
1.2 KiB
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_service_compensation_recipients', 'user_id']")
|
|
&& str_contains($deletion,
|
|
"['cloud_service_compensation_items', 'user_id']"),
|
|
'Account deletion does not remove compensation tenant PII.');
|
|
$assert(!str_contains($deletion,
|
|
"['cloud_service_compensations', 'requested_by_user_id']"),
|
|
'Account deletion must retain compensation batch audit.');
|
|
$assert(str_contains($deletion,
|
|
"->whereIn('user_id', \$ids)->where('state', 'applying')")
|
|
&& str_contains($deletion, '应用中的实例补偿'),
|
|
'Account deletion can erase an applying compensation item.');
|
|
$assert(str_contains($deletion,
|
|
"->whereIn('user_id', \$ids)->where('status', 'sending')")
|
|
&& str_contains($deletion, '投递中的补偿通知'),
|
|
'Account deletion can erase an in-flight compensation delivery.');
|
|
|
|
echo "Service compensation account-deletion contracts passed.\n";
|