noalyss-commit
[Top][All Lists]
Advanced

[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();
         



reply via email to

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