Skip to content

test(MIME): Add tests for MIME::getType() #57

@usernane

Description

@usernane

File

WebFiori/File/MIME.php

Current Coverage

No dedicated tests exist for the MIME class.

Scenarios to Cover

  • Common extensions return correct MIME types (jpg, png, txt, html, mp3, mp4, zip)
  • Case-insensitive lookup (JPG, Png, TXT)
  • Leading dot handling (.jpg, .png)
  • Unknown extensions return application/octet-stream
  • Empty string input
  • Extensions with whitespace

Notes

The MIME class is currently only tested indirectly through File and FileUploader tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTest coverage improvements

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions