JoeGandy / ShareX-Custom-Upload

A little PHP script created for uploading custom sharex files to your own webserver
MIT License
165 stars 50 forks source link

Fix testing #131

Closed theaquarium closed 3 years ago

theaquarium commented 3 years ago

All GitHub Actions tests seem to be failing now, so this fixes that. This PR updates the version of PHPUnit we use, and also accounts for an issue that occurs due to functions required in tests loading the merge-config.php file. Since merge-config.php now checks if a config.php file exists, it doesn't allow tests to proceed on a clean testing environment. As far as I can tell, the best way to get around this is to just pass the config object to functions that need config instead of loading it right in the function.

Let me know what you think.