2, 'uploads_deleted' => 2, 'active_skipped' => 1, 'errors' => self::$errors, 'private_path' => '/private/patient-do-not-print']; } } } namespace { require dirname(__DIR__) . '/vendor/autoload.php'; use app\common\service\followupaudio\FollowupAudioStore as Store; use app\command\FollowupAudioCleanup as Cleanup; $checks = 0; foreach ([[false, 0, 0], [false, 1, 1], [true, 0, 1]] as [$fail, $errors, $expected]) { Store::$fail = $fail; Store::$errors = $errors; $output = new \think\console\Output('buffer'); $code = (new Cleanup())->run(new \think\console\Input([]), $output); $text = $output->fetch(); if ($code !== $expected || str_contains($text, 'private')) { throw new \RuntimeException('Cleanup exit/redaction mismatch'); } $checks += 2; } echo 'FOLLOWUP_AUDIO_CLEANUP_COMMAND assertions=' . $checks . ' PASS errors_nonzero=1 no_sensitive_output=1' . PHP_EOL; }