[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 34/46: Typo , adapt unit-test
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 34/46: Typo , adapt unit-test |
Date: |
Tue, 13 Jul 2021 05:02:00 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 8e353e9072395b220d6d4f7d01f9b756293b90ec
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Jun 20 13:30:39 2021 +0200
Typo , adapt unit-test
---
include/admin_repo.inc.php | 2 +-
include/class/anc_account_table.class.php | 4 ++--
include/lib/database_core.class.php | 2 +-
unit-test/include/lib/table_sql_sqlTest.class.php | 6 ++++--
4 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/include/admin_repo.inc.php b/include/admin_repo.inc.php
index 9496e08..b47789b 100644
--- a/include/admin_repo.inc.php
+++ b/include/admin_repo.inc.php
@@ -113,7 +113,7 @@ if ( $action == "info" && SYSINFO_DISPLAY == true) {
echo "<li>". "NOALYSS_HOME".": ".NOALYSS_HOME."</li>";
echo "<li>"."NOALYSS_INCLUDE".": ".NOALYSS_INCLUDE."</li>";
echo "<li>"."NOALYSS_TEMPLATE".": ".NOALYSS_TEMPLATE."</li>";
- echo "<li>"."DEBUG".": ".DEBUG."</li>";
+ echo "<li>"."DEBUG".": ".DEBUGNOALYSS."</li>";
echo "<li>"."LOGINPUT".": ".LOGINPUT."</li>";
echo "<li>"."LOCALE".": ".LOCALE."</li>";
echo "<li>"."MULTI".": ".MULTI."</li>";
diff --git a/include/class/anc_account_table.class.php
b/include/class/anc_account_table.class.php
index 0363ddd..98ac210 100644
--- a/include/class/anc_account_table.class.php
+++ b/include/class/anc_account_table.class.php
@@ -57,8 +57,8 @@ class Anc_Account_Table extends Manage_Table_SQL
pa_id=$1
order by 2",0,array($p_table->pa_id));
$this->set_col_type("po_state","select",array(
- [
"value"=>"0",'label'=>_("Inactif")],
- [ "value"=>"1","label"=>_("Actif")]
+ [
"value"=>"1","label"=>_("Actif")],
+ [
"value"=>"0",'label'=>_("Inactif")]
));
}
diff --git a/include/lib/database_core.class.php
b/include/lib/database_core.class.php
index 71de743..8b68149 100644
--- a/include/lib/database_core.class.php
+++ b/include/lib/database_core.class.php
@@ -53,7 +53,7 @@ class DatabaseCore
function __construct($p_user, $p_password, $p_dbname, $p_host, $p_port)
{
- $this->db = pg_connect("dbname=$p_dbname host='$p_host' user='$p_user'
+ $this->db = @pg_connect("dbname=$p_dbname host='$p_host' user='$p_user'
password='$p_password' port=$p_port");
if ($this->db == false) {
if ( DEBUGNOALYSS > 0 ) {
diff --git a/unit-test/include/lib/table_sql_sqlTest.class.php
b/unit-test/include/lib/table_sql_sqlTest.class.php
index adf15b9..f146c6c 100644
--- a/unit-test/include/lib/table_sql_sqlTest.class.php
+++ b/unit-test/include/lib/table_sql_sqlTest.class.php
@@ -79,6 +79,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys sprl');
$this->object->set("po_name", "Nouveau poste");
$this->object->set("pa_id", "1");
$this->object->set("po_amount", "0");
+ $this->object->set("po_state", "1");
$this->object->save();
$id=$this->object->get("po_id");
$this->assertFalse(empty($id));
@@ -133,6 +134,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys
sprl');
$this->object->set("po_name", "Nouveau poste");
$this->object->set("pa_id", "1");
$this->object->set("po_amount", "1250");
+ $this->object->set("po_state", "1");
$this->object->save();
$id=$this->object->get("po_id");
$this->assertFalse(empty($id));
@@ -206,7 +208,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys
sprl');
//@covers Noalyss_SQL::from_array
public function testfrom_array()
{
- $this->object->from_array(["po_id"=>6, "po_name"=>"Test Unitaire",
"po_description"=>"", "po_amount"=>0, "pa_id"=>1]);
+ $this->object->from_array(["po_id"=>6, "po_name"=>"Test Unitaire",
"po_description"=>"", "po_amount"=>0, "pa_id"=>1,"po_state"=>0]);
$this->object->insert();
$this->object->load();
$this->assertEquals($this->object->get("po_name"), "TESTUNITAIRE");
@@ -289,7 +291,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys
sprl');
public function testbuild_query()
{
$str=$this->object->build_query();
- $expected=" select po_id,po_name,pa_id,po_amount,po_description,ga_id
from public.poste_analytique where po_id = $1";
+ $expected=" select
po_id,po_name,pa_id,po_amount,po_description,ga_id,po_state from
public.poste_analytique where po_id = $1";
$this->assertEquals($str,$expected);
}
- [Noalyss-commit] [noalyss] 41/46: Cosmetic #0002033: Alignement totaux + Trésorerie -> Financier/banque, (continued)
- [Noalyss-commit] [noalyss] 41/46: Cosmetic #0002033: Alignement totaux + Trésorerie -> Financier/banque, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 42/46: Typo , debug information, jQuery available, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 43/46: check that g_user exists and not the g_theme, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 46/46: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 45/46: Cosmetic : unwanted char in operation detail, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 37/46: Manage_Table show header even if table empty, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 13/46: Forecast : protect against empty name, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 14/46: Bug simple report : FROM 00.0000 was computed from user preference instead of end period. Improve ergonomy, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 25/46: Cosmetic : appearance h2.info, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 30/46: fix bug, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 34/46: Typo , adapt unit-test,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 38/46: Remove Actif / Passif as card attribute, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 39/46: Acc_ledger : use $currency_rate instead of variable from extract, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 40/46: Merge branch 'b-orion' into 'master', Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 44/46: Cosmetic : unwanted char in operation detail, Dany De Bontridder, 2021/07/13