From 1e07580bb22723d4edd01025a1e0d5cdcafc5ec8 Mon Sep 17 00:00:00 2001 From: surtic86 Date: Wed, 25 Feb 2026 20:52:44 +0100 Subject: [PATCH] Remove stale test for deleted decryptFileToCallback method The method was removed in 729e014 but its unit test was not cleaned up. Co-Authored-By: Claude Opus 4.6 --- tests/Unit/FileEncryptionServiceTest.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/tests/Unit/FileEncryptionServiceTest.php b/tests/Unit/FileEncryptionServiceTest.php index 61d6fe6..52419c4 100644 --- a/tests/Unit/FileEncryptionServiceTest.php +++ b/tests/Unit/FileEncryptionServiceTest.php @@ -219,26 +219,6 @@ test('wrong key on chunked file throws exception', function () { $this->service->decryptFile($encryptedPath, $wrongKey); })->throws(RuntimeException::class, 'Decryption failed'); -test('decryptFileToCallback returns working stream resource', function () { - $sourcePath = $this->tempDir.'/source.txt'; - $encryptedPath = $this->tempDir.'/encrypted.enc'; - $content = 'Callback decrypted content'; - - file_put_contents($sourcePath, $content); - - $key = $this->service->generateRandomKey(); - $this->service->encryptFile($sourcePath, $encryptedPath, $key); - - $callback = $this->service->decryptFileToCallback($encryptedPath, $key); - $resource = $callback(); - - expect(is_resource($resource))->toBeTrue(); - - $decrypted = stream_get_contents($resource); - fclose($resource); - - expect($decrypted)->toBe($content); -}); test('decrypt file stream with file size sets content-length header', function () { $sourcePath = $this->tempDir.'/source.txt';