瀏覽代碼

Fix phpunit

Laurent Destailleur 8 年之前
父節點
當前提交
6e31de731b
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      htdocs/societe/class/societe.class.php
  2. 1 1
      test/phpunit/SocieteTest.php

+ 1 - 1
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");
 

+ 1 - 1
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.