From 7811796491e43aae16fc1a60356f61ffd5d9fe9a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Apr 2018 15:43:26 +0200 Subject: [PATCH] Fix test --- test/phpunit/FactureTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index d3e202f33c2..2fe0b751e1f 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -216,7 +216,13 @@ class FactureTest extends PHPUnit_Framework_TestCase $newlocalobject=new Facture($this->savdb); $newlocalobject->initAsSpecimen(); $this->changeProperties($newlocalobject); - $this->assertEquals($this->objCompare($localobject,$newlocalobject,true,array('newref','oldref','id','lines','client','thirdparty','brouillon','user_author','date_creation','date_validation','datem','ref','statut','paye','specimen','facnumber','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')), array()); // Actual, Expected + + // Hack to avoid test to be wrong when module sellyoursaas is on + unset($localobject->array_options['options_commission']); + unset($localobject->array_options['options_reseller']); + + $arraywithdiff = $this->objCompare($localobject,$newlocalobject,true,array('newref','oldref','id','lines','client','thirdparty','brouillon','user_author','date_creation','date_validation','datem','ref','statut','paye','specimen','facnumber','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')); + $this->assertEquals($arraywithdiff, array()); // Actual, Expected return $localobject; }