FilenameToTypeTest: reorganize to use data providers
FilenameToTypeTest: reorganize to use data providers

* Maintains the same test code and test cases.
* Removes code duplication.
* Makes it easier to add additional test cases in the future.

nawawi/PHPMailer,PHPMailer/PHPMailer,jimjag/PHPMailer,nawawi/PHPMailer,PHPMailer/PHPMailer,jimjag/PHPMailer