noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 07/12: Improve test


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 07/12: Improve test
Date: Sat, 17 Sep 2022 08:40:57 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 3decfb84c21ac51d6c780574ebfdee61689bc2b8
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Wed Sep 14 16:33:29 2022 +0200

    Improve test
---
 unit-test/dossier25.sql.gz                         | Bin 393069 -> 393280 bytes
 unit-test/include/class/acc_ledger_search.Test.php |   2 +-
 unit-test/include/class/pdf_anc_acc_listTest.php   |   6 +++---
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/unit-test/dossier25.sql.gz b/unit-test/dossier25.sql.gz
index cde5fcc91..13780fabf 100644
Binary files a/unit-test/dossier25.sql.gz and b/unit-test/dossier25.sql.gz 
differ
diff --git a/unit-test/include/class/acc_ledger_search.Test.php 
b/unit-test/include/class/acc_ledger_search.Test.php
index d4a37ed17..dcd680250 100644
--- a/unit-test/include/class/acc_ledger_search.Test.php
+++ b/unit-test/include/class/acc_ledger_search.Test.php
@@ -88,7 +88,7 @@ class Acc_Ledger_Test extends TestCase
         $ledger=new Acc_Ledger_Search('ALL');
         $r=$ledger->display_search_form();
         \Noalyss\Facility::save_file(__DIR__."/file", 
"acc_ledger_search-test_display_search_form.html", $r);
-        $this->assertEquals(9697,strlen($r),"Size of the html string for 
display_search_form see "
+        $this->assertEquals(9685,strlen($r),"Size of the html string for 
display_search_form see "
                 . 
__DIR__."/file/acc_ledger_search-test_display_search_form.html ");
     }
     /**
diff --git a/unit-test/include/class/pdf_anc_acc_listTest.php 
b/unit-test/include/class/pdf_anc_acc_listTest.php
index 1bcf914be..8d32a6a1a 100644
--- a/unit-test/include/class/pdf_anc_acc_listTest.php
+++ b/unit-test/include/class/pdf_anc_acc_listTest.php
@@ -134,7 +134,7 @@ EOF;
         $anc_acc_list->card_poste=2;
         $pdf_anc_acc=new PDF_Anc_Acc_List($anc_acc_list);
         
$pdf_anc_acc->export_pdf()->Output(__DIR__."/file/pdf_anc_acc_list-account-activity.pdf","F");
-        
$this->assertEquals(77150,filesize(__DIR__."/file/pdf_anc_acc_list-account-activity.pdf"),
+        
$this->assertGreaterThan(77149,filesize(__DIR__."/file/pdf_anc_acc_list-account-activity.pdf"),
                __DIR__."/file/pdf_anc_acc_list-account-activity.pdf incorrect 
");
         
         // By Activity / Card
@@ -145,7 +145,7 @@ EOF;
         $anc_acc_list->card_poste=3;
         $pdf_anc_acc=new PDF_Anc_Acc_List($anc_acc_list);
         
$pdf_anc_acc->export_pdf()->Output(__DIR__."/file/pdf_anc_acc_list-activity-card.pdf","F");
-        
$this->assertEquals(77689,filesize(__DIR__."/file/pdf_anc_acc_list-activity-card.pdf"),
+        
$this->assertGreaterThan(77600,filesize(__DIR__."/file/pdf_anc_acc_list-activity-card.pdf"),
                 __DIR__."/file/pdf_anc_acc_list-activity-card.pdf incorrect");
         
           // By Activity / Account
@@ -156,7 +156,7 @@ EOF;
         $anc_acc_list->card_poste=4;
         $pdf_anc_acc=new PDF_Anc_Acc_List($anc_acc_list);
         
$pdf_anc_acc->export_pdf()->Output(__DIR__."/file/pdf_anc_acc_list-activity-account.pdf","F");
-        
$this->assertEquals(76411,filesize(__DIR__."/file/pdf_anc_acc_list-activity-account.pdf"),
+        
$this->assertGreaterThan(76400,filesize(__DIR__."/file/pdf_anc_acc_list-activity-account.pdf"),
                 __DIR__."/file/pdf_anc_acc_list-activity-account.pdf 
incorrect");
     }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]