[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
- [Noalyss-commit] [noalyss] branch master updated (3a1ebb55c -> b77ac34d8), dwm, 2023/08/09
- [Noalyss-commit] [noalyss] 08/10: Remove VAT_CODE in printing ledgers, dwm, 2023/08/09
- [Noalyss-commit] [noalyss] 09/10: Improve PHPUNIT,
dwm <=
- [Noalyss-commit] [noalyss] 01/10: Search with VAT : filter, dwm, 2023/08/09
- [Noalyss-commit] [noalyss] 07/10: PHP8.1 comptability deprecated null string, dwm, 2023/08/09
- [Noalyss-commit] [noalyss] 06/10: Improve autonumbering accounting, to force accounting in parent class, dwm, 2023/08/09
- [Noalyss-commit] [noalyss] 04/10: replace by NOALYSS_INCLUDE, dwm, 2023/08/09
- [Noalyss-commit] [noalyss] 02/10: set DBVERSION, dwm, 2023/08/09
- [Noalyss-commit] [noalyss] 10/10: TEST : for testing patch files, dwm, 2023/08/09
- [Noalyss-commit] [noalyss] 03/10: fix typo, dwm, 2023/08/09
- [Noalyss-commit] [noalyss] 05/10: Fix document generate, dwm, 2023/08/09