diff --git a/test/phpunit/FactureRecTest.php b/test/phpunit/FactureRecTest.php index 3778989945a..0250b659e47 100644 --- a/test/phpunit/FactureRecTest.php +++ b/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]); } } diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index 17cc4176a87..26396ae2c30 100644 --- a/test/phpunit/FactureTest.php +++ b/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]); } } diff --git a/test/phpunit/UserTest.php b/test/phpunit/UserTest.php index 3f27c90cbe1..a8486451c47 100644 --- a/test/phpunit/UserTest.php +++ b/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]); }