[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 137/173: Fiche.Test : add test cmp_name and g
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 137/173: Fiche.Test : add test cmp_name and get_row |
Date: |
Mon, 22 Mar 2021 12:59:12 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 9aa27a67e149409ce871e98341eba82bf5d8855f
Author: Dany De Bontridder <danydb@noalyss.eu>
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] 102/173: Task #0001698: Problème affichage historique fiches, (continued)
- [Noalyss-commit] [noalyss] 102/173: Task #0001698: Problème affichage historique fiches, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 141/173: Merge commit '3e075a0a1aa8b6e42c458571ef0380a9c38f18fa' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 106/173: Merge branch 'accept7100' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 108/173: Bug with p_jrn, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 109/173: Task #1759 = PRINTBAL sur 4 colonnes, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 112/173: Save_form_plan must use the array, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 116/173: Merge branch 'dev7102' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 119/173: improve test for fiche get_row, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 134/173: Merge branch 'dev7202' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 135/173: Merge branch 'dev7220' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 137/173: Fiche.Test : add test cmp_name and get_row,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 145/173: Merge branch 'entreprise' into next-release-8, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 138/173: Test Unit Acc_Account_Legder , rounded value fixed, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 139/173: Fix cosmetic and typo, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 147/173: Error : duplicate function update_row, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 151/173: htmlspecialchars use HTML5 and UTF8, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 114/173: fixup! Printtva , under some circumstance tva_summary::check fails, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 131/173: Merge branch 'dev-7201' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 142/173: Merge commit 'db9d4c53d1325b1ab3c8a3fcae6ddd201799fb42' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 146/173: Merge branch 'pre7300' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 150/173: Include Bootstrap, Dany De Bontridder, 2021/03/22