From fdaa930507ff78011d990fa8e0f1f94422ac0a26 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Jan 2015 01:58:48 +0100 Subject: [PATCH] Solve phpunit. Fix database field format --- htdocs/install/mysql/migration/3.7.0-3.8.0.sql | 6 +++--- htdocs/install/mysql/tables/llx_facture.sql | 6 +++--- test/phpunit/FactureTest.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql index f9e00505f0a..13f367c51fa 100755 --- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql +++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql @@ -47,9 +47,9 @@ ALTER TABLE llx_product_fournisseur_price ADD fk_price_expression integer DEFAUL insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 2131, 213, '5', '0', 'VAT 5%', 1); -- Add situation invoices -ALTER TABLE llx_facture ADD COLUMN situation_cycle_ref integer; -ALTER TABLE llx_facture ADD COLUMN situation_counter integer; -ALTER TABLE llx_facture ADD COLUMN situation_final integer; +ALTER TABLE llx_facture ADD COLUMN situation_cycle_ref smallint; +ALTER TABLE llx_facture ADD COLUMN situation_counter smallint; +ALTER TABLE llx_facture ADD COLUMN situation_final smallint; ALTER TABLE llx_facturedet ADD COLUMN situation_percent real; ALTER TABLE llx_facturedet ADD COLUMN fk_prev_id integer; diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 144cd349dd6..eada5b46c2e 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -78,8 +78,8 @@ create table llx_facture import_key varchar(14), extraparams varchar(255), -- for stock other parameters with json format - situation_cycle_ref smallint UNSIGNED, -- situation cycle reference - situation_counter tinyint UNSIGNED, -- situation counter - situation_final boolean -- is the situation final ? + situation_cycle_ref smallint, -- situation cycle reference + situation_counter smallint, -- situation counter + situation_final smallint -- is the situation final ? )ENGINE=innodb; diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index c68014e9606..3248be7104c 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -216,7 +216,7 @@ 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')), array()); // Actual, Expected + $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')), array()); // Actual, Expected return $localobject; }