2
0
forked from Wavyzz/dolibarr

Fix phpunit

This commit is contained in:
Laurent Destailleur
2024-07-13 02:22:26 +02:00
parent 0fe143d710
commit 7879e12bd2
2 changed files with 8 additions and 1 deletions

View File

@@ -24,6 +24,7 @@
* \brief This file is a test suite to run all unit tests
* \remarks To run this script as CLI: phpunit filename.php
*/
print "PHP Version: ".phpversion()."\n";
print "Memory limit: ". ini_get('memory_limit')."\n";
@@ -32,6 +33,10 @@ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$_SERVER['PHP_SELF'] = "phpunit";
}
if (! defined('NOREQUIREUSER')) {
define('PHPUNIT_MODE', 1);
}
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
//require_once 'PHPUnit/Autoload.php';