Add tests for MD_STD_IN::sanitize_url() and ensure it supports rewriting

unencoded cyrillic inputs

Close #7
This commit is contained in:
2023-11-05 23:29:14 +01:00
parent 2176e7312b
commit ae12cfdf0f
4 changed files with 99 additions and 4 deletions

25
tests/bootstrap.php Normal file
View File

@ -0,0 +1,25 @@
<?PHP
declare(strict_types = 1);
/**
* Autoloader for musdb.
*
* @param string $className Name of the class to load.
*
* @return void
*/
\spl_autoload_register(function(string $className):void {
// Try using class map as defined through /scripts/buildClassMap.php
foreach (array_merge([__DIR__ . '/../tests', __DIR__ . '/../src', __DIR__ . '/../../MDErrorReporter', __DIR__ . '/../../MDErrorReporter/exceptions', __DIR__ . '/../../MDErrorReporter/exceptions/generic', __DIR__ . '/../../MDErrorReporter/exceptions/updates']) as $classDir) {
if (\file_exists("$classDir/$className.php")) {
include "$classDir/$className.php";
return;
}
}
});