Update CommonClassTest.class.php

This commit is contained in:
Laurent Destailleur 2024-03-11 12:49:15 +01:00 committed by GitHub
parent ff0d147847
commit 29216f3d4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,8 +26,10 @@
* \remarks Class that extends all PHPunit tests. To share similare code between each test.
*/
// Workaround for false security issue with main.inc.php in tests:
$_SERVER['PHP_SELF'] = "phpunit";
// Workaround for false security issue with main.inc.php on Windows in tests:
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$_SERVER['PHP_SELF'] = "phpunit";
}
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver