Browse Source

Fix phpunit

Laurent Destailleur 9 years ago
parent
commit
a36b780c53

+ 2 - 2
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

+ 2 - 2
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

+ 1 - 1
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";