Laurent Destailleur 4 gadi atpakaļ
vecāks
revīzija
100edffdaf

+ 4 - 8
test/phpunit/FactureRecTest.php

@@ -183,22 +183,18 @@ class FactureRecTest extends PHPUnit\Framework\TestCase
     {
         $retAr=array();
 
-        if (get_class($oA) !== get_class($oB))
-        {
+        if (get_class($oA) !== get_class($oB)) {
             $retAr[]="Supplied objects are not of same class.";
         } else {
             $oVarsA=get_object_vars($oA);
             $oVarsB=get_object_vars($oB);
             $aKeys=array_keys($oVarsA);
-            foreach ($aKeys as $sKey)
-            {
+            foreach ($aKeys as $sKey) {
                 if (in_array($sKey, $fieldstoignorearray)) continue;
-                if (! $ignoretype && $oVarsA[$sKey] !== $oVarsB[$sKey])
-                {
+                if (! $ignoretype && ($oVarsA[$sKey] !== $oVarsB[$sKey])) {
                     $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]);
                 }
-                if ($ignoretype && $oVarsA[$sKey] != $oVarsB[$sKey])
-                {
+                if ($ignoretype && ($oVarsA[$sKey] != $oVarsB[$sKey])) {
                     $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]);
                 }
             }

+ 5 - 9
test/phpunit/FactureTest.php

@@ -241,7 +241,7 @@ class FactureTest extends PHPUnit\Framework\TestCase
 				'ref','statut','paye','specimen','ref','actiontypecode','actionmsg2','actionmsg','mode_reglement','cond_reglement',
 				'cond_reglement_doc','situation_cycle_ref','situation_counter','situation_final','multicurrency_total_ht','multicurrency_total_tva',
 				'multicurrency_total_ttc','fk_multicurrency','multicurrency_code','multicurrency_tx',
-                'retained_warranty' ,'retained_warranty_date_limit', 'retained_warranty_fk_cond_reglement', 'specimen'
+                'retained_warranty' ,'retained_warranty_date_limit', 'retained_warranty_fk_cond_reglement', 'specimen', 'trackid'
 			)
 		);
         $this->assertEquals($arraywithdiff, array());    // Actual, Expected
@@ -362,22 +362,18 @@ class FactureTest extends PHPUnit\Framework\TestCase
     {
         $retAr=array();
 
-        if (get_class($oA) !== get_class($oB))
-        {
+        if (get_class($oA) !== get_class($oB)) {
             $retAr[]="Supplied objects are not of same class.";
         } else {
             $oVarsA=get_object_vars($oA);
             $oVarsB=get_object_vars($oB);
             $aKeys=array_keys($oVarsA);
-            foreach ($aKeys as $sKey)
-            {
+            foreach ($aKeys as $sKey) {
                 if (in_array($sKey, $fieldstoignorearray)) continue;
-                if (! $ignoretype && $oVarsA[$sKey] !== $oVarsB[$sKey])
-                {
+                if (! $ignoretype && ($oVarsA[$sKey] !== $oVarsB[$sKey])) {
                     $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]);
                 }
-                if ($ignoretype && $oVarsA[$sKey] != $oVarsB[$sKey])
-                {
+                if ($ignoretype && ($oVarsA[$sKey] != $oVarsB[$sKey])) {
                     $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]);
                 }
             }

+ 2 - 3
test/phpunit/UserTest.php

@@ -200,7 +200,7 @@ class UserTest extends PHPUnit\Framework\TestCase
         $newlocalobject=new User($this->savdb);
         $newlocalobject->initAsSpecimen();
         $this->changeProperties($newlocalobject);
-        $this->assertEquals($this->objCompare($localobject, $newlocalobject, true, array('id','socid','societe_id','specimen','note','ref','pass','pass_indatabase','pass_indatabase_crypted','pass_temp','datec','datem','datelastlogin','datepreviouslogin')), array());    // Actual, Expected
+        $this->assertEquals($this->objCompare($localobject, $newlocalobject, true, array('id','socid','societe_id','specimen','note','ref','pass','pass_indatabase','pass_indatabase_crypted','pass_temp','datec','datem','datelastlogin','datepreviouslogin','trackid')), array());    // Actual, Expected
 
         return $localobject;
     }
@@ -340,8 +340,7 @@ class UserTest extends PHPUnit\Framework\TestCase
             $oVarsB=get_object_vars($oB);
             $aKeys=array_keys($oVarsA);
             foreach ($aKeys as $sKey) {
-                if (in_array($sKey, $fieldstoignorearray))
-                    continue;
+                if (in_array($sKey, $fieldstoignorearray)) continue;
                 if (! $ignoretype && ($oVarsA[$sKey] !== $oVarsB[$sKey])) {
                     $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]);
                 }