From a36b780c53a3a1891f4af6aded32cdbead02c52d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 May 2016 20:30:04 +0200 Subject: [PATCH] Fix phpunit --- htdocs/install/mysql/migration/3.9.0-4.0.0.sql | 4 ++-- htdocs/install/mysql/tables/llx_c_accounting_category.sql | 4 ++-- test/phpunit/SqlTest.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 136a7114eb0..f996ca3677a 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -364,8 +364,8 @@ CREATE TABLE llx_c_accounting_category ( code varchar(16) NOT NULL, label varchar(255) NOT NULL, range_account varchar(255) NOT NULL, - sens tinyint(1) NOT NULL DEFAULT '0', -- For international accounting 0 : credit - debit / 1 : debit - credit - category_type tinyint(1) NOT NULL DEFAULT '0', -- Field calculated or not + sens tinyint NOT NULL DEFAULT '0', -- For international accounting 0 : credit - debit / 1 : debit - credit + category_type tinyint NOT NULL DEFAULT '0', -- Field calculated or not formula varchar(255) NOT NULL, -- Example : 1 + 2 (rowid of the category) position integer DEFAULT 0, fk_country integer DEFAULT NULL, -- This category is dedicated to a country diff --git a/htdocs/install/mysql/tables/llx_c_accounting_category.sql b/htdocs/install/mysql/tables/llx_c_accounting_category.sql index a5ca2a0352b..683478aceef 100644 --- a/htdocs/install/mysql/tables/llx_c_accounting_category.sql +++ b/htdocs/install/mysql/tables/llx_c_accounting_category.sql @@ -23,8 +23,8 @@ CREATE TABLE llx_c_accounting_category ( code varchar(16) NOT NULL, label varchar(255) NOT NULL, range_account varchar(255) NOT NULL, - sens tinyint(1) NOT NULL DEFAULT '0', -- For international accounting 0 : credit - debit / 1 : debit - credit - category_type tinyint(1) NOT NULL DEFAULT '0', -- Field calculated or not + sens tinyint NOT NULL DEFAULT '0', -- For international accounting 0 : credit - debit / 1 : debit - credit + category_type tinyint NOT NULL DEFAULT '0', -- Field calculated or not formula varchar(255) NOT NULL, -- Example : 1 + 2 (rowid of the category) position integer DEFAULT 0, fk_country integer DEFAULT NULL, -- This category is dedicated to a country diff --git a/test/phpunit/SqlTest.php b/test/phpunit/SqlTest.php index 887d2aa89bb..0a9acc50220 100644 --- a/test/phpunit/SqlTest.php +++ b/test/phpunit/SqlTest.php @@ -162,7 +162,7 @@ class SqlTest extends PHPUnit_Framework_TestCase $result=strpos($filecontent,'int('); print __METHOD__." Result for checking we don't have 'int(' instead of 'integer' = ".$result."\n"; - $this->assertTrue($result===false, 'Found int(x) instead of integer into '.$file.'. Bad.'); + $this->assertTrue($result===false, 'Found int(x) or tinyint(x) instead of integer or tinyint into '.$file.'. Bad.'); $result=strpos($filecontent,'ON DELETE CASCADE'); print __METHOD__." Result for checking we don't have 'ON DELETE CASCADE' = ".$result."\n";