From 2d0e57ce7cf8b4ba6df6623c9bc5c8a58748bc75 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Mar 2024 14:13:17 +0100 Subject: [PATCH] Fix test for pgsql --- htdocs/core/db/mysqli.class.php | 2 +- htdocs/core/db/pgsql.class.php | 2 +- test/phpunit/DoliDBTest.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index c1b7bdd487c..245eb650990 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -889,7 +889,7 @@ class DoliDBMysqli extends DoliDB $i++; } } - $sql .= implode(',', $sqlfields); + $sql .= implode(', ', $sqlfields); if ($primary_key != "") { $sql .= ",".$pk; } diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 71ba5f5279a..0a32d49325e 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -1127,7 +1127,7 @@ class DoliDBPgsql extends DoliDB $i++; } } - $sql .= implode(',', $sqlfields); + $sql .= implode(', ', $sqlfields); if ($primary_key != "") { $sql .= ",".$pk; } diff --git a/test/phpunit/DoliDBTest.php b/test/phpunit/DoliDBTest.php index adafc6a676c..e2af4b7071c 100644 --- a/test/phpunit/DoliDBTest.php +++ b/test/phpunit/DoliDBTest.php @@ -66,11 +66,11 @@ class DoliDBTest extends CommonClassTest $res = $db->DDLDropTable($namedic); $columns = array( - 'rowid' => array('type' => 'integer', 'value' => 11, 'AUTO_INCREMENT PRIMARY KEY'), + 'rowid' => array('type' => 'integer', 'AUTO_INCREMENT PRIMARY KEY'), 'code' => array('type' => 'varchar', 'value' => 255, 'null'=>'NOT NULL'), 'label' => array('type' => 'varchar', 'value' => 255, 'null'=>'NOT NULL'), - 'position' => array('type' => 'integer', 'value' => 11, 'null'=>'NULL'), - 'use_default' => array('type' => 'varchar', 'value' => 11, 'default'=>'1'), + 'position' => array('type' => 'integer', 'null'=>'NULL'), + 'use_default' => array('type' => 'varchar', 'value' => 1, 'default'=>'1'), 'active' => array('type' => 'integer', 'value' => 3) ); $primaryKey = 'rowid';