From 9c31ee11e24e7275be217c029e22f6efa2ccf633 Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Sun, 22 Dec 2024 18:26:36 +0300 Subject: [PATCH] test: Add Missing Files to Coverage --- tests/phpunit.xml | 4 ++-- webfiori/file/FileUploader.php | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 40fd6e9..f01bae4 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -6,8 +6,8 @@ ../webfiori/file/File.php ../webfiori/file/MIME.php - ../webfiori/file/UploadFile.php - ../webfiori/file/Uploader.php + ../webfiori/file/UploadedFile.php + ../webfiori/file/FileUploader.php ../webfiori/file/exceptions/FileException.php diff --git a/webfiori/file/FileUploader.php b/webfiori/file/FileUploader.php index 7d05de1..0b69066 100644 --- a/webfiori/file/FileUploader.php +++ b/webfiori/file/FileUploader.php @@ -628,10 +628,6 @@ private function isError(int $code): bool { $this->uploadStatusMessage = 'File Size is Larger Than '.(intval(ini_get('upload_max_filesize')) / 1000).'KB. Found in php.ini.'; break; } - case UPLOAD_ERR_FORM_SIZE:{ - $this->uploadStatusMessage = 'File Size is Larger Than '.($this->getLimit() / 1000).'KB'; - break; - } case UPLOAD_ERR_PARTIAL:{ $this->uploadStatusMessage = 'File Uploaded Partially'; break; @@ -649,7 +645,7 @@ private function isError(int $code): bool { break; } default :{ - $this->uploadStatusMessage = 'No File was Uploaded'; + $this->uploadStatusMessage = 'No File was Uploaded due to uknown error'; } }