Fix: Add a test to be sure PHPunit tests are run with correct language.
This commit is contained in:
parent
198c453a09
commit
e699711b36
@ -31,6 +31,12 @@ global $conf,$user,$langs,$db;
|
|||||||
require_once 'PHPUnit/Autoload.php';
|
require_once 'PHPUnit/Autoload.php';
|
||||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.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))
|
if (empty($user->id))
|
||||||
{
|
{
|
||||||
print "Load permissions for admin user nb 1\n";
|
print "Load permissions for admin user nb 1\n";
|
||||||
|
|||||||
@ -36,6 +36,7 @@ if (empty($user->id))
|
|||||||
$user->fetch(1);
|
$user->fetch(1);
|
||||||
$user->getrights();
|
$user->getrights();
|
||||||
}
|
}
|
||||||
|
|
||||||
$conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
$conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user