[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 38/46: Fiche.Test : add test cmp_name and get
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 38/46: Fiche.Test : add test cmp_name and get_row |
Date: |
Mon, 4 May 2020 13:38:54 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 1df841b71d18b640efb91e0e2288c7fd45272f5e
Author: Dany De Bontridder <address@hidden>
AuthorDate: Sat Apr 4 14:59:24 2020 +0200
Fiche.Test : add test cmp_name and get_row
---
unit-test/include/class/fiche.Test.php | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/unit-test/include/class/fiche.Test.php
b/unit-test/include/class/fiche.Test.php
index e3fe39c..08e2cf4 100644
--- a/unit-test/include/class/fiche.Test.php
+++ b/unit-test/include/class/fiche.Test.php
@@ -37,7 +37,10 @@ class FicheTest extends TestCase
*/
public function testCmp_name()
{
-
+ include 'global.php';
+ $fiche=new \Fiche($g_connection,21);
+ $fiche_2=new \Fiche($g_connection,25);
+ $this->assertGreaterThan(\Fiche::cmp_name($fiche, $fiche_2),0);
}
/**
@@ -60,8 +63,25 @@ class FicheTest extends TestCase
*/
public function testGet_row()
{
- $this->assertTrue(is_array($this->object->get_row(235,238)));
-
+ include 'global.php';
+ $card_count=$g_connection->get_array("select count(*),f_id ".
+ " from jrnx ".
+ " where ".
+ " f_id is not null ".
+ "group by f_id order by count(*) desc");
+ $a=new Fiche($g_connection,$card_count[0]['f_id']);
+ try {
+ $a->get_row(235,238);
+ $this->assertFalse(TRUE,"Exception periode non executée");
+ } catch (\Exception $e) {
+ $this->assertTrue(TRUE);
+ }
+ $a_result= $a->get_row(92,131);
+ // Size == 25
+
+ $nb_result=count($a_result);
+ $this->assertEquals ($nb_result,3,"Size array not correct ");
+ $this->assertEquals($a_result[0][24]["deb_montant"],204.71);
}
}
- [Noalyss-commit] [noalyss] 20/46: Cosmetic : Opération prédéfinie, modèle, (continued)
- [Noalyss-commit] [noalyss] 20/46: Cosmetic : Opération prédéfinie, modèle, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 17/46: Task #1756: Avertissement qcode, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 21/46: if you want to modify the accounting , it must not be used before., Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 26/46: Task #0001793: Installation mot de passe, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 32/46: Task #0001793: Installation mot de passe Empêche @mobile , doc, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 34/46: Bug #0001245: Type actif - passif pour nouvelle fiche à partir de fiche Erreur dans PARM_POSTE pour la compta française, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 35/46: Bug #0001245: Type actif - passif pour nouvelle fiche à partir de fiche Erreur dans PARM_POSTE pour la compta française, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 28/46: Task #0001793: Installation mot de passe remove debug info, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 33/46: Task #1277 : RTF conversion char accentuated, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 36/46: Merge branch 'dev7202', Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 38/46: Fiche.Test : add test cmp_name and get_row,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 40/46: Fix cosmetic and typo, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 22/46: HtmlOutput tab , add mode row, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 27/46: Task #0001793: Installation mot de passe, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 29/46: Task #0001793: Installation mot de passe for password , use NOALYSS_ADMIN_PASSWORD, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 31/46: Task #0001793: Installation mot de passe Adapt comment, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 37/46: Bug database.class.php : n'applique pas le patch, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 39/46: Test Unit Acc_Account_Legder , rounded value fixed, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 41/46: Cleanup + new logo, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 43/46: Improve installation for MONO : doc + password, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 45/46: Output_Tab : set mode to row by default + cosmetic, Dany De Bontridder, 2020/05/04