Files
api/services/nginx/app/tests/Unit/Invoicing/EconomicTransferQueueHardeningTest.php
T

14 lines
716 B
PHP

<?php
it('hardens transfer queue with type validation retry caps and stale lock recovery', function (): void {
$content = file_get_contents(app_path('classes/economic_transfer_queue.php'));
expect($content)->not->toBeFalse();
expect($content)->toContain('private const STALE_PROCESSING_LOCK_SECONDS = 900');
expect($content)->toContain('$this->validateTransferType($transfer_type)');
expect($content)->toContain('$max_attempts = max(1, min(10, $max_attempts));');
expect($content)->toContain('Queue job reached max retry attempts');
expect($content)->toContain('AND attempts < max_attempts');
expect($content)->toContain('private function releaseStaleProcessingLocks(): void');
});