Skip to content

Commit

Permalink
test: Add Missing Files to Coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed Dec 22, 2024
1 parent 090d2c5 commit 9c31ee1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<whitelist addUncoveredFilesFromWhitelist="true">
<file>../webfiori/file/File.php</file>
<file>../webfiori/file/MIME.php</file>
<file>../webfiori/file/UploadFile.php</file>
<file>../webfiori/file/Uploader.php</file>
<file>../webfiori/file/UploadedFile.php</file>
<file>../webfiori/file/FileUploader.php</file>
<file>../webfiori/file/exceptions/FileException.php</file>
</whitelist>
</filter>
Expand Down
6 changes: 1 addition & 5 deletions webfiori/file/FileUploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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';
}
}

Expand Down

0 comments on commit 9c31ee1

Please sign in to comment.