2
0
forked from Wavyzz/dolibarr

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

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