mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-01 12:59:36 +00:00
Add tests for backup/update manager improvements
- Controller tests: auth, CSRF validation, 404 for missing backups, restore disabled check - UpdateExecutor: deleteLog validation, non-existent file, successful deletion - BackupManager: deleteBackup validation for missing/non-zip files
This commit is contained in:
parent
3c41597262
commit
e6ac77ffde
3 changed files with 180 additions and 0 deletions
|
|
@ -82,6 +82,16 @@ final class BackupManagerTest extends KernelTestCase
|
|||
$this->assertSame('2.6.0', $matches[2]);
|
||||
}
|
||||
|
||||
public function testDeleteBackupReturnsFalseForNonExistentFile(): void
|
||||
{
|
||||
$this->assertFalse($this->backupManager->deleteBackup('non-existent.zip'));
|
||||
}
|
||||
|
||||
public function testDeleteBackupReturnsFalseForNonZipFile(): void
|
||||
{
|
||||
$this->assertFalse($this->backupManager->deleteBackup('not-a-zip.txt'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test version parsing with different filename formats.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue