[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 15/27: Facility improve page_start
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 15/27: Facility improve page_start |
Date: |
Sat, 2 Nov 2019 18:12:18 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 62ab35ef609656fd3f912e5e667a10ce14e20504
Author: Dany De Bontridder <address@hidden>
Date: Sat Nov 2 17:47:29 2019 +0100
Facility improve page_start
---
include/class/acc_ledger_history_generic.class.php | 3 ---
unit-test/facility.class.php | 14 ++++++++------
.../class/acc_ledger_history_financialTest.class.php | 4 ++--
.../include/class/acc_ledger_history_genericTest.class.php | 8 ++++----
.../class/acc_ledger_history_purchaseTest.class.php | 8 ++++----
.../include/class/acc_ledger_history_saleTest.class.php | 8 ++++----
6 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/include/class/acc_ledger_history_generic.class.php
b/include/class/acc_ledger_history_generic.class.php
index 8770f82..8014b7c 100644
--- a/include/class/acc_ledger_history_generic.class.php
+++ b/include/class/acc_ledger_history_generic.class.php
@@ -777,9 +777,6 @@ class Acc_Ledger_History_Generic extends Acc_Ledger_History
if (count($this->data)==0)
exit;
$old_id="";
- /**
- * @todo add table headers
- */
foreach ($this->data[0] as $idx=>$op)
{
// should clean description : remove <b><i> tag and '; char
diff --git a/unit-test/facility.class.php b/unit-test/facility.class.php
index 25afcd0..b38c396 100644
--- a/unit-test/facility.class.php
+++ b/unit-test/facility.class.php
@@ -34,7 +34,7 @@ class Facility
static function page_start()
{
$noalyss_home=NOALYSS_HOME;
- echo <<<EOF
+ $ret=<<<EOF
<!doctype html>
<HTML><HEAD><meta charset="utf-8"><META http-equiv="Content-Type"
content="text/html; charset=UTF-8">
<TITLE>PRINTJRN NOALYSS</TITLE>
@@ -50,16 +50,18 @@ class Facility
<body>
<div class="content">
EOF;
+ return $ret;
}
+
/**
* Create a file with the content
- * @param type $p_dir
- * @param type $p_file
- * @param type $p_content
+ * @param string $p_dir usually __DIR__
+ * @param string $p_file name of the file
+ * @param string $p_content content
*/
- static function save_file($p_dir,$p_file,$p_content)
+ static function save_file($p_dir, $p_file, $p_content)
{
- $hFile=fopen($p_dir."/".$p_name,"w+");
+ $hFile=fopen($p_dir."/".$p_name, "w+");
fwrite($hFile, $content);
fclose($hFile);
}
diff --git a/unit-test/include/class/acc_ledger_history_financialTest.class.php
b/unit-test/include/class/acc_ledger_history_financialTest.class.php
index 67e6ac5..058b89f 100644
--- a/unit-test/include/class/acc_ledger_history_financialTest.class.php
+++ b/unit-test/include/class/acc_ledger_history_financialTest.class.php
@@ -74,7 +74,7 @@ class Acc_Ledger_History_FinancialTest extends TestCase
$name="acc_ledger_history_export_listing.html";
$this->object->set_m_mode("L");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
@@ -85,7 +85,7 @@ class Acc_Ledger_History_FinancialTest extends TestCase
$name="acc_ledger_history_export_accounting.html";
$this->object->set_m_mode("E");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
diff --git a/unit-test/include/class/acc_ledger_history_genericTest.class.php
b/unit-test/include/class/acc_ledger_history_genericTest.class.php
index b412cc4..c9b3f46 100644
--- a/unit-test/include/class/acc_ledger_history_genericTest.class.php
+++ b/unit-test/include/class/acc_ledger_history_genericTest.class.php
@@ -73,7 +73,7 @@ class Acc_Ledger_History_GenericTest extends TestCase
$name="acc_ledger_history_Generic_export_listing.html";
$this->object->set_m_mode("L");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
@@ -84,7 +84,7 @@ class Acc_Ledger_History_GenericTest extends TestCase
$name="acc_ledger_history_Generic_export_extended.html";
$this->object->set_m_mode("E");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
@@ -95,7 +95,7 @@ class Acc_Ledger_History_GenericTest extends TestCase
$name="acc_ledger_history_Generic_export_detail.html";
$this->object->set_m_mode("D");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
@@ -106,7 +106,7 @@ class Acc_Ledger_History_GenericTest extends TestCase
$name="acc_ledger_history_Generic_export_accounting.html";
$this->object->set_m_mode("D");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
diff --git a/unit-test/include/class/acc_ledger_history_purchaseTest.class.php
b/unit-test/include/class/acc_ledger_history_purchaseTest.class.php
index b6dd9ed..de8485e 100644
--- a/unit-test/include/class/acc_ledger_history_purchaseTest.class.php
+++ b/unit-test/include/class/acc_ledger_history_purchaseTest.class.php
@@ -72,7 +72,7 @@ class Acc_Ledger_History_PurchaseTest extends TestCase
$name="acc_ledger_history_purchase_export_listing.html";
$this->object->set_m_mode("L");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
@@ -83,7 +83,7 @@ class Acc_Ledger_History_PurchaseTest extends TestCase
$name="acc_ledger_history_purchase_export_extended.html";
$this->object->set_m_mode("E");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
@@ -94,7 +94,7 @@ class Acc_Ledger_History_PurchaseTest extends TestCase
$name="acc_ledger_history_purchase_export_detail.html";
$this->object->set_m_mode("D");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
@@ -105,7 +105,7 @@ class Acc_Ledger_History_PurchaseTest extends TestCase
$name="acc_ledger_history_purchase_export_accounting.html";
$this->object->set_m_mode("D");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
diff --git a/unit-test/include/class/acc_ledger_history_saleTest.class.php
b/unit-test/include/class/acc_ledger_history_saleTest.class.php
index d76263b..01cc924 100644
--- a/unit-test/include/class/acc_ledger_history_saleTest.class.php
+++ b/unit-test/include/class/acc_ledger_history_saleTest.class.php
@@ -70,7 +70,7 @@ class Acc_Ledger_History_SaleTest extends TestCase
$name="acc_ledger_history_sale_export_listing.html";
$this->object->set_m_mode("L");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
@@ -81,7 +81,7 @@ class Acc_Ledger_History_SaleTest extends TestCase
$name="acc_ledger_history_sale_export_extended.html";
$this->object->set_m_mode("E");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
@@ -92,7 +92,7 @@ class Acc_Ledger_History_SaleTest extends TestCase
$name="acc_ledger_history_sale_export_detail.html";
$this->object->set_m_mode("D");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
@@ -103,7 +103,7 @@ class Acc_Ledger_History_SaleTest extends TestCase
$name="acc_ledger_history_sale_export_accounting.html";
$this->object->set_m_mode("D");
ob_start();
- \Noalyss\Facility::page_start();
+ echo \Noalyss\Facility::page_start();
$this->object->export_html();
$content=ob_get_contents();
- [Noalyss-commit] [noalyss] 08/27: Acc_Ledger_FIN Remove DeadCode : show_ledger, (continued)
- [Noalyss-commit] [noalyss] 08/27: Acc_Ledger_FIN Remove DeadCode : show_ledger, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 09/27: Test : Acc_Ledger_FIN, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 12/27: Test : Acc_Ledger_History_Financial Test : Acc_Ledger_History_Purchase Add function phpunit_page_start, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 03/27: Merge branch 'v7110-stable', Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 01/27: documentation, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 06/27: Code Cleaning : remove direct access to global , add Exception, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 25/27: TEST fix bug in acc_balanceTest, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 13/27: TEST : Acc_Ledger_History*, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 14/27: Facility : new function to help with phpunit, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 26/27: Documentation, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 15/27: Facility improve page_start,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 22/27: Merge branch 'dev-7200', Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 21/27: Bug : export PDF for PRINTTVA doesn't print all the ledgers, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 17/27: Documentation, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 07/27: TEST : add new files, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 19/27: PRINTTVA : cosmetic bug, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 27/27: Merge branch 'dev-7200', Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 20/27: TEST : update, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 16/27: TEST : Acc_Ledger_Purchase + Acc_Ledger_Sale, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 24/27: Documentation, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 23/27: TEST fix bug in acc_balanceTest, Dany De Bontridder, 2019/11/02