Fix phpunit

This commit is contained in:
Laurent Destailleur 2017-05-21 21:21:44 +02:00
parent 3e381aa5a2
commit 4a085a8cc0
7 changed files with 14 additions and 3 deletions

View File

@ -569,7 +569,7 @@ class Account extends CommonObject
$sql.= ", '".$this->db->escape($this->label)."'";
$sql.= ", ".$conf->entity;
$sql.= ", '".$this->db->escape($this->account_number)."'";
$sql.= ", '".$this->db->escape($this->fk_accountancy_journal)."'";
$sql.= ", ".($this->fk_accountancy_journal > 0 ? $this->db->escape($this->fk_accountancy_journal) : "null");
$sql.= ", '".$this->db->escape($this->bank)."'";
$sql.= ", '".$this->code_banque."'";
$sql.= ", '".$this->code_guichet."'";
@ -702,8 +702,7 @@ class Account extends CommonObject
$sql.= ",rappro = ".$this->rappro;
$sql.= ",url = ".($this->url?"'".$this->url."'":"null");
$sql.= ",account_number = '".$this->db->escape($this->account_number)."'";
$sql.= ",fk_accountancy_journal = '".$this->db->escape($this->fk_accountancy_journal)."'";
$sql.= ",fk_accountancy_journal = ".($this->fk_accountancy_journal > 0 ? $this->db->escape($this->fk_accountancy_journal) : "null");
$sql.= ",bank = '".$this->db->escape($this->bank)."'";
$sql.= ",code_banque='".$this->db->escape($this->code_banque)."'";
$sql.= ",code_guichet='".$this->db->escape($this->code_guichet)."'";

View File

@ -39,6 +39,8 @@ if (empty($user->id))
}
$conf->global->MAIN_DISABLE_ALL_MAILS=1;
$conf->global->MAIN_UMASK='0666';
/**
* Class for PHPUnit tests

View File

@ -38,6 +38,8 @@ if (empty($user->id)) {
}
$conf->global->MAIN_DISABLE_ALL_MAILS=1;
$conf->global->MAIN_UMASK='0666';
/**
* Class for PHPUnit tests

View File

@ -38,6 +38,8 @@ if (empty($user->id)) {
}
$conf->global->MAIN_DISABLE_ALL_MAILS=1;
$conf->global->MAIN_UMASK='0666';
/**
* Class for PHPUnit tests

View File

@ -40,6 +40,8 @@ if (empty($user->id)) {
}
$conf->global->MAIN_DISABLE_ALL_MAILS=1;
$conf->global->MAIN_UMASK='0666';
if (empty($conf->service->enabled))
{
print "Error: Module service must be enabled.\n";

View File

@ -38,6 +38,8 @@ if (empty($user->id)) {
}
$conf->global->MAIN_DISABLE_ALL_MAILS=1;
$conf->global->MAIN_UMASK='0666';
/**
* Class for PHPUnit tests

View File

@ -38,6 +38,8 @@ if (empty($user->id)) {
}
$conf->global->MAIN_DISABLE_ALL_MAILS=1;
$conf->global->MAIN_UMASK='0666';
/**
* Class for PHPUnit tests