Fix: Add a test to be sure PHPunit tests are run with correct language.

This commit is contained in:
Laurent Destailleur 2012-02-20 01:36:01 +01:00
parent 198c453a09
commit e699711b36
2 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,12 @@ global $conf,$user,$langs,$db;
require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
if ($langs->defaultlang != 'en_US')
{
print "Error: Default language for company to run tests must be set to en_US or auto. Current is ".$langs->defaultlang."\n";
exit;
}
if (empty($user->id))
{
print "Load permissions for admin user nb 1\n";

View File

@ -36,6 +36,7 @@ if (empty($user->id))
$user->fetch(1);
$user->getrights();
}
$conf->global->MAIN_DISABLE_ALL_MAILS=1;