noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 09/10: Improve PHPUNIT


From: dwm
Subject: [Noalyss-commit] [noalyss] 09/10: Improve PHPUNIT
Date: Wed, 9 Aug 2023 09:20:23 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 0d57e8fbea63c22f9c798233b9da183b36215e38
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Wed Aug 9 13:11:01 2023 +0200

    Improve PHPUNIT
---
 unit-test/include/class/acc_ledgerTest.php       | 6 +++++-
 unit-test/include/class/pdf_anc_acc_listTest.php | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/unit-test/include/class/acc_ledgerTest.php 
b/unit-test/include/class/acc_ledgerTest.php
index 591bb8e57..e73dae402 100644
--- a/unit-test/include/class/acc_ledgerTest.php
+++ b/unit-test/include/class/acc_ledgerTest.php
@@ -91,7 +91,9 @@ class Acc_LedgerTest extends TestCase
      */
     public function testGet_last_pj()
     {   
- 
+        // reset sequence
+        global $g_connection;
+        $g_connection->exec_sql("alter sequence  s_jrn_pj2 restart with 43");
         $this->object->id=2;
         $sPj=$this->object->get_last_pj(2);
         $this->assertEquals(42,$sPj);
@@ -240,6 +242,8 @@ class Acc_LedgerTest extends TestCase
      */
     public function testGuess_pj()
     {
+        global $g_connection;
+        $g_connection->exec_sql("alter sequence  s_jrn_pj2 restart with 43");
         $this->object->id=2;
         $r=$this->object->guess_pj();
         $this->assertEquals("VEN43",$r);
diff --git a/unit-test/include/class/pdf_anc_acc_listTest.php 
b/unit-test/include/class/pdf_anc_acc_listTest.php
index 34c8aaefe..8af94b519 100644
--- a/unit-test/include/class/pdf_anc_acc_listTest.php
+++ b/unit-test/include/class/pdf_anc_acc_listTest.php
@@ -124,7 +124,7 @@ EOF;
         $pdf_anc_acc=new PDF_Anc_Acc_List($anc_acc_list);
         
$pdf_anc_acc->export_pdf()->Output(__DIR__."/file/pdf_anc_acc_list-card-activity.pdf","F");
         $filesize=filesize(__DIR__."/file/pdf_anc_acc_list-card-activity.pdf");
-        $this->assertTrue($filesize==76920||$filesize==79619,
+        $this->assertTrue($filesize==77276,
                 __DIR__."/file/pdf_anc_acc_list-card-activity.pdf incorrect");
         
         // By Account / Activity



reply via email to

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