mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix phpunit
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
* \remarks To run this script as CLI: phpunit filename.php
|
||||
*/
|
||||
|
||||
define('PHPUNIT_MODE', 1);
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user