From 6e31de731b8cd376a0b185b30cf8a78e7d7e8b57 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 May 2017 20:24:56 +0200 Subject: [PATCH] Fix phpunit --- htdocs/societe/class/societe.class.php | 2 +- test/phpunit/SocieteTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 6aebf0e8786..995c16719cb 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -841,7 +841,7 @@ class Societe extends CommonObject $sql .= ",fk_effectif = ".(! empty($this->effectif_id)?"'".$this->db->escape($this->effectif_id)."'":"null"); if (isset($this->stcomm_id)) { - $sql .= ",fk_stcomm=".($this->stcomm_id > 0 ? $this->stcomm_id : "null"); + $sql .= ",fk_stcomm=".($this->stcomm_id > 0 ? $this->stcomm_id : "0"); } $sql .= ",fk_typent = ".(! empty($this->typent_id)?"'".$this->db->escape($this->typent_id)."'":"0"); diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php index 24b868b743e..31aa98fd082 100755 --- a/test/phpunit/SocieteTest.php +++ b/test/phpunit/SocieteTest.php @@ -79,7 +79,7 @@ class SocieteTest extends PHPUnit_Framework_TestCase if ($conf->global->SOCIETE_CODECLIENT_ADDON != 'mod_codeclient_monkey') { print "\n".__METHOD__." third party ref checker must be setup to 'mod_codeclient_monkey' not to '".$conf->global->SOCIETE_CODECLIENT_ADDON."'.\n"; die(); } - if (! empty($conf->global->MAIN_DISABLEPROFIDRULES)) { print "\n".__METHOD__." constant MAIN_DISABLEPROFIDRULE must be empty (if a module set it, disable module).\n"; die(); } + if (! empty($conf->global->MAIN_DISABLEPROFIDRULES)) { print "\n".__METHOD__." constant MAIN_DISABLEPROFIDRULES must be empty (if a module set it, disable module).\n"; die(); } $db->begin(); // This is to have all actions inside a transaction even if test launched without suite.