diff --git a/include/ajax/ajax_gestion.php b/include/ajax/ajax_gestion.php
index 08f38c184..9f1c38707 100644
--- a/include/ajax/ajax_gestion.php
+++ b/include/ajax/ajax_gestion.php
@@ -80,8 +80,11 @@ if ($op=='action_save')
}
catch (Exception $ex)
{
- record_log($ex->getTraceAsString());
- header('Content-type: text/xml; charset=UTF-8');
+ record_log($ex);
+ if (! headers_sent())
+ {
+ header('Content-type: text/xml; charset=UTF-8');
+ }
$dom=new DOMDocument('1.0', 'UTF-8');
$xml_content=$dom->createElement('content', $ex->getMessage());
$xml_status=$dom->createElement('status', "NOK");
@@ -114,11 +117,14 @@ if ($op=='action_save')
$gestion->save_short();
} catch (Exception $ex)
{
- record_log($ex->getTraceAsString());
+ record_log($ex);
$content=$ex->getMessage();
$status='NOK';
}
- header('Content-type: text/xml; charset=UTF-8');
+ if (! headers_sent())
+ {
+ header('Content-type: text/xml; charset=UTF-8');
+ }
$dom=new DOMDocument('1.0', 'UTF-8');
$xml_content=$dom->createElement('content', $content);
$xml_status=$dom->createElement('status', $status);
diff --git a/include/class/acc_ledger_history.class.php b/include/class/acc_ledger_history.class.php
index 4a391337c..c60769581 100644
--- a/include/class/acc_ledger_history.class.php
+++ b/include/class/acc_ledger_history.class.php
@@ -39,7 +39,7 @@ abstract class Acc_Ledger_History
public $db; //!< database connx
protected $ledger_type; //! type of ledger VEN , ACH , ODS, FIN
protected $filter_operation; //!< to filter paid, unpaid or all operation
- protected $data; // Contains data see acc_ledger_history_financial->get_row
+ protected $data; //!< Contains data see acc_ledger_history_financial->get_row
/**
*
* @param Database $cn
diff --git a/include/class/anc_acc_list.class.php b/include/class/anc_acc_list.class.php
index 0d4a2f24f..53f122d28 100644
--- a/include/class/anc_acc_list.class.php
+++ b/include/class/anc_acc_list.class.php
@@ -33,6 +33,7 @@
class Anc_Acc_List extends Anc_Acc_Link
{
var $arow; //!< $arow array of row from
+ var $card_poste;
/**
*@brief display form to get the parameter
* - card_poste 1 by card, 2 by account
diff --git a/include/class/print_ledger.class.php b/include/class/print_ledger.class.php
index 718eb14bf..a7b82aabe 100644
--- a/include/class/print_ledger.class.php
+++ b/include/class/print_ledger.class.php
@@ -31,7 +31,7 @@
#[AllowDynamicProperties]
class Print_Ledger extends PDF
{
- protected $filter_operation; // See Acc_Ledger_History::filter_operation
+ protected $filter_operation; //!< See Acc_Ledger_History::filter_operation
protected $ledger ; //!< concerned Ledger
protected $from ; //build_object();
$array = $acc_reconciliation->get_data(0);
- $this->assertEquals(8, count($array), "count number of rows found");
+ $this->assertEquals(6, count($array), "count number of rows found");
}
/**
@@ -100,6 +100,6 @@ class Acc_ReconciliationTest extends TestCase {
$acc_reconciliation->build_temp_total_operation();
$acc_reconciliation->build_temp_total_operation();
$cnt = $this->connection->get_value("select count(*) from temp_total_operation");
- $this->assertEquals(16, $cnt, " incorrect number of rows");
+ $this->assertEquals(12, $cnt, " incorrect number of rows");
}
}
diff --git a/unit-test/include/class/AccountRepositoryTest.php b/unit-test/include/class/AccountRepositoryTest.php
index 97c8f32f4..c1fb375c6 100644
--- a/unit-test/include/class/AccountRepositoryTest.php
+++ b/unit-test/include/class/AccountRepositoryTest.php
@@ -142,6 +142,7 @@ class AccountRepositoryTest extends TestCase {
function testCreate() {
try {
$repo = new \Database(0);
+ $repo->exec_sql("drop database if exists phpunit_account_repository ");
$repo->exec_sql("create database phpunit_account_repository encoding='utf8'");
$db = $this->make_conx();
@@ -161,10 +162,8 @@ class AccountRepositoryTest extends TestCase {
$db->start();
$nb_table = $db->get_value("select count(*) from information_schema.tables where table_schema='public'");
$db->commit();
- $db->close();
$this->assertEquals(11, $nb_table, " number of table incorrect $nb_table");
} catch (\Exception $ex) {
- $db->close();
echo $ex->getMessage();
echo $ex->getTraceAsString();
$this->assertTrue(false, __CLASS__ . " cannot create DB");
diff --git a/unit-test/include/class/DocumentTest.php b/unit-test/include/class/DocumentTest.php
index eed2e873d..e206f6a88 100644
--- a/unit-test/include/class/DocumentTest.php
+++ b/unit-test/include/class/DocumentTest.php
@@ -198,13 +198,14 @@ class DocumentTest extends TestCase {
$this->assertTrue($document->replace('CUST_NAME', $array) == 'Client 1', 'CUST_NAME');
}
+
/**
* @testdox Generate Document::generate(), Document::parseDocument(),Document::replace(); require unoconv -l in another session
* @covers Document::generate(), Document::parseDocument(),Document::replace();
- * @backupGlobals disabled
*/
function testGenerate() {
- require_once 'global.php';
+ require DIRTEST . '/global.php';
+
$cn = Dossier::connect();
$md_id = $cn->get_value('select max(md_id) md_id from document_modele where md_name=$1', ['Balise']);
$array['e_client'] = 'CLIENT';
diff --git a/unit-test/include/class/acc_computeTest.php b/unit-test/include/class/acc_computeTest.php
index 5065de633..862f785fa 100644
--- a/unit-test/include/class/acc_computeTest.php
+++ b/unit-test/include/class/acc_computeTest.php
@@ -194,6 +194,16 @@ class Acc_ComputeTest extends TestCase
public function testCompute()
{
+ print "**********************************************";
+ print PHP_EOL;
+ print "
OUTPUT IN HTML , USE LYNX TO READ
";
+ print PHP_EOL;
+ print " OR REDIRECT TO HTML";
+ print PHP_EOL;
+ print "**********************************************";
+ print PHP_EOL;
+ print "phpunit |lynx -stdin";
+ print PHP_EOL;
$a=new Acc_Compute();
// Compute some operation to see if the computed amount are
// correct
diff --git a/unit-test/include/class/acc_ledgerTest.php b/unit-test/include/class/acc_ledgerTest.php
index 1f8e3f981..4960daefa 100644
--- a/unit-test/include/class/acc_ledgerTest.php
+++ b/unit-test/include/class/acc_ledgerTest.php
@@ -578,7 +578,7 @@ class Acc_LedgerTest extends TestCase
{
global $g_connection;
$ledger=new Acc_Ledger($g_connection,4);
- $this->expectException(Exception::class);
+ $this->expectException(\Exception::class);
$array=[
"p_jrn"=>"15",
"p_jrn_deb_max_line"=>5,
@@ -598,7 +598,7 @@ class Acc_LedgerTest extends TestCase
{
global $g_connection;
$ledger=new Acc_Ledger($g_connection,4);
- $this->expectException(Exception::class);
+ $this->expectException(\Exception::class);
$array=[
"p_jrn"=>"15",
"p_jrn_deb_max_line"=>5,
@@ -901,7 +901,7 @@ class Acc_LedgerTest extends TestCase
ob_end_clean();
\Noalyss\Facility::save_file(__DIR__."/file", "acc_ledger-input_new.html", $result);
$size=filesize(__DIR__."/file/acc_ledger-input_new.html");
- $this->assertTrue($size == 16063 ," output input_new is $size not what it is expected");
+ $this->assertTrue($size == 16075 ," output input_new is $size not what it is expected");
}
diff --git a/unit-test/include/class/acc_ledger_purchaseTest.php b/unit-test/include/class/acc_ledger_purchaseTest.php
index c41f20bf3..3de6143cd 100644
--- a/unit-test/include/class/acc_ledger_purchaseTest.php
+++ b/unit-test/include/class/acc_ledger_purchaseTest.php
@@ -16,7 +16,7 @@ class Acc_Ledger_PurchaseTest extends TestCase
* @var Acc_Ledger_Purchase
*/
protected $object;
-
+ private $array1;
/**
* @var array transmitted by _POST
*/
diff --git a/unit-test/include/class/acc_ledger_saleTest.php b/unit-test/include/class/acc_ledger_saleTest.php
index da3be8d85..5a5c1d3d6 100644
--- a/unit-test/include/class/acc_ledger_saleTest.php
+++ b/unit-test/include/class/acc_ledger_saleTest.php
@@ -20,6 +20,7 @@ class Acc_Ledger_SaleTest extends TestCase
* @var type
*/
private $array;
+ private $array1;
/**
* Sets up the fixture, for example, opens a network connection.
diff --git a/unit-test/include/class/acc_ledger_searchTest.php b/unit-test/include/class/acc_ledger_searchTest.php
index e491140ad..062ec46ea 100644
--- a/unit-test/include/class/acc_ledger_searchTest.php
+++ b/unit-test/include/class/acc_ledger_searchTest.php
@@ -89,7 +89,7 @@ class Acc_Ledger_searchTest extends TestCase
$r=$ledger->display_search_form();
\Noalyss\Facility::save_file(__DIR__."/file", "acc_ledger_search-test_display_search_form.html", $r);
$filesize=strlen($r);
- $this->assertTrue($filesize==10966,"Size of the html string for display_search_form see "
+ $this->assertTrue($filesize==10971,"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/acc_letterTest.php b/unit-test/include/class/acc_letterTest.php
index efa3797c3..6343d2e2d 100644
--- a/unit-test/include/class/acc_letterTest.php
+++ b/unit-test/include/class/acc_letterTest.php
@@ -32,14 +32,13 @@ use PHPUnit\Framework\TestCase;
* @backupGlobals enabled
*/
require DIRTEST.'/global.php';
-#[\AllowDynamicProperties]
class Acc_LetterTest extends TestCase
{
/**
* @var Fiche
*/
protected $object;
-
+ private $a_column;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test method is executed.
diff --git a/unit-test/include/class/acc_operationTest.php b/unit-test/include/class/acc_operationTest.php
index e2c16dee6..75e7a23a8 100644
--- a/unit-test/include/class/acc_operationTest.php
+++ b/unit-test/include/class/acc_operationTest.php
@@ -320,7 +320,7 @@ class Acc_OperationTest extends TestCase
// $this->assertEquals('BP19-1',$receipt,'Receipt number incorrect');
$acc_operation=new Acc_Operation($g_connection);
$acc_operation->set_id(250);
- $this->pj="";
+ $acc_operation->pj="";
$acc_operation->update_receipt();
$new_receipt=$g_connection->get_value("select jr_pj_number from jrn where jr_id=250");
$this->assertTrue($new_receipt== null,'receipt not set to null ');
diff --git a/unit-test/include/class/card_propertyTest.php b/unit-test/include/class/card_propertyTest.php
index 400629c7f..2179706fc 100644
--- a/unit-test/include/class/card_propertyTest.php
+++ b/unit-test/include/class/card_propertyTest.php
@@ -206,7 +206,7 @@ class Card_PropertyTest extends TestCase
global $g_connection;
$fiche=$this->getFiche();
Card_Property::load($fiche);
- $this->assertEquals(count($fiche->attribut), 36, 'there are not 36 attributes');
+ $this->assertEquals(count($fiche->attribut), 41, 'there are not 41 attributes');
$fiche=new Fiche($g_connection);
Card_Property::load($fiche);
$this->assertTrue(empty($fiche->attribut),'Card property must be equals to 0 (unknown category ');
diff --git a/unit-test/include/class/followupTest.php b/unit-test/include/class/followupTest.php
index 46aad8c41..10e0d9803 100644
--- a/unit-test/include/class/followupTest.php
+++ b/unit-test/include/class/followupTest.php
@@ -137,7 +137,7 @@ class FollowupTest extends TestCase
$content=ob_get_contents();
ob_end_clean();
$this->assertStringContainsString("BONDEC3-1", $content);
- $this->assertTrue(mb_strlen($content)==1621,"error result not valid $content size = ".mb_strlen($content));
+ $this->assertTrue(mb_strlen($content)>=1619 && mb_strlen($content)<1642,"error result not valid $content size = ".mb_strlen($content));
}
diff --git a/unit-test/include/class/followup_detail.Test.php b/unit-test/include/class/followup_detail.Test.php
index 3463984ab..d27f849a9 100644
--- a/unit-test/include/class/followup_detail.Test.php
+++ b/unit-test/include/class/followup_detail.Test.php
@@ -41,7 +41,7 @@ class Follow_Up_DetailTest extends TestCase
* @var Fiche
*/
protected $object;
-
+ private $g_connection;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test method is executed.
diff --git a/unit-test/include/class/noalyssAppearanceTest.php b/unit-test/include/class/noalyssAppearanceTest.php
index 0f35f3e69..4a0725e6d 100644
--- a/unit-test/include/class/noalyssAppearanceTest.php
+++ b/unit-test/include/class/noalyssAppearanceTest.php
@@ -48,7 +48,7 @@ class noalyssAppearanceTest extends TestCase
$this->object->load();
$this->assertEquals("#554433",$this->object->get_color("FOLDER"));
$this->object->reset();
- $this->assertEquals("#ffffff",$this->object->get_color("FOLDER"));
+ $this->assertEquals("#fafafa",$this->object->get_color("FOLDER"));
}
/**
diff --git a/unit-test/include/class/noalyss_parameter_folderTest.php b/unit-test/include/class/noalyss_parameter_folderTest.php
index 122371f7f..30cd99709 100644
--- a/unit-test/include/class/noalyss_parameter_folderTest.php
+++ b/unit-test/include/class/noalyss_parameter_folderTest.php
@@ -67,7 +67,8 @@ class Noalyss_Parameter_FolderTest extends TestCase
"MY_UPDLAB,".
"MY_ANC_FILTER,".
"MY_REPORT,".
- "MY_STOCK");
+ "MY_STOCK,".
+ "MY_COUNTRY_CODE");
}
public function testNew()
diff --git a/unit-test/include/class/pdf_anc_acc_listTest.php b/unit-test/include/class/pdf_anc_acc_listTest.php
index 60f99bfe1..0459db51d 100644
--- a/unit-test/include/class/pdf_anc_acc_listTest.php
+++ b/unit-test/include/class/pdf_anc_acc_listTest.php
@@ -126,7 +126,7 @@ EOF;
$filesize=filesize(__DIR__."/file/pdf_anc_acc_list-card-activity.pdf");
$this->assertTrue($filesize >= 77102 && $filesize <= 77289,
__DIR__."/file/pdf_anc_acc_list-card-activity.pdf $filesize incorrect");
-
+ print __DIR__."/file/pdf_anc_acc_list-card-activity.pdf".PHP_EOL;
// By Account / Activity
$anc_acc_list=new Anc_Acc_List($g_connection);
$anc_acc_list->to='31.12.2019';
@@ -137,6 +137,7 @@ EOF;
$pdf_anc_acc->export_pdf()->Output(__DIR__."/file/pdf_anc_acc_list-account-activity.pdf","F");
$this->assertGreaterThan(77149,filesize(__DIR__."/file/pdf_anc_acc_list-account-activity.pdf"),
__DIR__."/file/pdf_anc_acc_list-account-activity.pdf incorrect ");
+ print __DIR__."/file/pdf_anc_acc_list-account-activity.pdf".PHP_EOL;
// By Activity / Card
$anc_acc_list=new Anc_Acc_List($g_connection);
@@ -148,6 +149,7 @@ EOF;
$pdf_anc_acc->export_pdf()->Output(__DIR__."/file/pdf_anc_acc_list-activity-card.pdf","F");
$this->assertGreaterThan(77600,filesize(__DIR__."/file/pdf_anc_acc_list-activity-card.pdf"),
__DIR__."/file/pdf_anc_acc_list-activity-card.pdf incorrect");
+ print __DIR__."/file/pdf_anc_acc_list-activity-card.pdf".PHP_EOL;
// By Activity / Account
$anc_acc_list=new Anc_Acc_List($g_connection);
@@ -159,6 +161,7 @@ EOF;
$pdf_anc_acc->export_pdf()->Output(__DIR__."/file/pdf_anc_acc_list-activity-account.pdf","F");
$this->assertGreaterThan(76000,filesize(__DIR__."/file/pdf_anc_acc_list-activity-account.pdf"),
__DIR__."/file/pdf_anc_acc_list-activity-account.pdf incorrect");
+ print __DIR__."/file/pdf_anc_acc_list-activity-account.pdf".PHP_EOL;
}
}
diff --git a/unit-test/include/class/print_LedgerTest.php b/unit-test/include/class/print_LedgerTest.php
index c4ef54953..1a1ad2820 100644
--- a/unit-test/include/class/print_LedgerTest.php
+++ b/unit-test/include/class/print_LedgerTest.php
@@ -34,7 +34,7 @@ class print_LedgerTest extends TestCase
* @var
*/
protected $object;
-
+ private $from,$to;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
diff --git a/unit-test/include/class/print_ledger_detailTest.php b/unit-test/include/class/print_ledger_detailTest.php
index eb85db112..9f7273823 100644
--- a/unit-test/include/class/print_ledger_detailTest.php
+++ b/unit-test/include/class/print_ledger_detailTest.php
@@ -35,7 +35,7 @@ class Print_Ledger_DetailTest extends TestCase
* @var
*/
protected $object;
-
+ private $from,$to;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
diff --git a/unit-test/include/class/print_ledger_detail_item.classTest.php b/unit-test/include/class/print_ledger_detail_itemTest.php
similarity index 98%
rename from unit-test/include/class/print_ledger_detail_item.classTest.php
rename to unit-test/include/class/print_ledger_detail_itemTest.php
index 2d3bf7dfd..346088281 100644
--- a/unit-test/include/class/print_ledger_detail_item.classTest.php
+++ b/unit-test/include/class/print_ledger_detail_itemTest.php
@@ -33,7 +33,7 @@ class Print_Ledger_Detail_ItemTest extends TestCase
* @var
*/
protected $object;
-
+ private $from,$to;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
@@ -63,7 +63,7 @@ class Print_Ledger_Detail_ItemTest extends TestCase
// Purchase
//-------------------------------------------------------------------------------------------------------------
- $ledger_purchase=new Acc_Ledger_Purchase($g_connection,3);
+ $ledger_purchase=new \Acc_Ledger_Purchase($g_connection,3);
// Paid
//------------
diff --git a/unit-test/include/class/print_ledger_fin.classTest.php b/unit-test/include/class/print_ledger_finTest.php
similarity index 93%
rename from unit-test/include/class/print_ledger_fin.classTest.php
rename to unit-test/include/class/print_ledger_finTest.php
index e51bf1d45..615a9add2 100644
--- a/unit-test/include/class/print_ledger_fin.classTest.php
+++ b/unit-test/include/class/print_ledger_finTest.php
@@ -33,7 +33,7 @@ class Print_Ledger_FinTest extends TestCase
* @var
*/
protected $object;
-
+ private $from,$to;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
@@ -72,7 +72,7 @@ class Print_Ledger_FinTest extends TestCase
$ledger->setTitle(_("Journal"), true);
$ledger->export();
$ledger->Output(__DIR__."/file/financial-detail.pdf","F");
-
+ print "create ".__DIR__."/file/financial-detail.pdf". PHP_EOL;
$ledger=\Print_Ledger::factory($g_connection,"L", $ledger_fin, $p_from, $p_to, "paid");
$this->assertTrue($ledger instanceof Print_Ledger_Financial
,"Fin. Detail returns Print_Ledger_Financial");
@@ -83,7 +83,7 @@ class Print_Ledger_FinTest extends TestCase
$ledger->setTitle(_("Journal"), true);
$ledger->export();
$ledger->Output(__DIR__."/file/financial-listing.pdf","F");
-
+print "create ".__DIR__."/file/financial-listing.pdf". PHP_EOL;
$ledger=\Print_Ledger::factory($g_connection,"E", $ledger_fin, $p_from, $p_to, "paid");
$this->assertTrue($ledger instanceof Print_Ledger_Detail
@@ -95,6 +95,7 @@ class Print_Ledger_FinTest extends TestCase
$ledger->setTitle(_("Journal"), true);
$ledger->export();
$ledger->Output(__DIR__."/file/financial-extended.pdf","F");
+print "create ".__DIR__."/file/financial-extended.pdf". PHP_EOL;
$ledger=\Print_Ledger::factory($g_connection,"A", $ledger_fin, $p_from, $p_to, "paid");
$this->assertTrue($ledger instanceof Print_Ledger_Detail
@@ -106,6 +107,7 @@ class Print_Ledger_FinTest extends TestCase
$ledger->setTitle(_("Journal"), true);
$ledger->export();
$ledger->Output(__DIR__."/file/financial-accounting.pdf","F");
+print "create ".__DIR__."/file/financial-accounting.pdf". PHP_EOL;
}
}
diff --git a/unit-test/include/class/print_ledger_misc.classTest.php b/unit-test/include/class/print_ledger_miscTest.php
similarity index 94%
rename from unit-test/include/class/print_ledger_misc.classTest.php
rename to unit-test/include/class/print_ledger_miscTest.php
index 100a978e6..0416d50f1 100644
--- a/unit-test/include/class/print_ledger_misc.classTest.php
+++ b/unit-test/include/class/print_ledger_miscTest.php
@@ -32,7 +32,7 @@ class Print_Ledger_MiscTest extends TestCase
* @var
*/
protected $object;
-
+ private $from,$to;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
@@ -73,6 +73,7 @@ class Print_Ledger_MiscTest extends TestCase
$ledger->setTitle(_("Journal Opérations diverses "), true);
$ledger->export();
$ledger->Output(__DIR__."/file/print_ledger_detail_misc.pdf", "F");
+ print __DIR__."/file/print_ledger_detail_misc.pdf". PHP_EOL;
$ledger=\Print_Ledger::factory($g_connection, "L", $ledger_misc, $p_from, $p_to, "all");
$this->assertTrue($ledger instanceof Print_Ledger_Misc
@@ -84,6 +85,7 @@ class Print_Ledger_MiscTest extends TestCase
$ledger->setTitle(_("Journal Opérations diverses"), true);
$ledger->export();
$ledger->Output(__DIR__."/file/print_ledger_misc.pdf", "F");
+ print __DIR__."/file/print_ledger_misc.pdf". PHP_EOL;
}
}
diff --git a/unit-test/include/class/print_ledger_simple.classTest.php b/unit-test/include/class/print_ledger_simpleTest.php
similarity index 92%
rename from unit-test/include/class/print_ledger_simple.classTest.php
rename to unit-test/include/class/print_ledger_simpleTest.php
index 6a0667bb1..9b68fe03e 100644
--- a/unit-test/include/class/print_ledger_simple.classTest.php
+++ b/unit-test/include/class/print_ledger_simpleTest.php
@@ -33,7 +33,7 @@ class print_ledger_simpleTest extends TestCase
* @var
*/
protected $object;
-
+ private $from,$to;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
@@ -82,6 +82,8 @@ class print_ledger_simpleTest extends TestCase
$ledger->setTitle(_("Journal Achat Payé"), true);
$ledger->export();
$ledger->Output(__DIR__."/file/print_ledger_simple_purchase_paid.pdf", "F");
+ $this->assertFileExists(__DIR__."/file/print_ledger_simple_purchase_paid.pdf");
+print __DIR__."/file/print_ledger_simple_purchase_paid.pdf".PHP_EOL;
// Unpaid
//------------
@@ -97,7 +99,7 @@ class print_ledger_simpleTest extends TestCase
$ledger->export();
$ledger->Output(__DIR__."/file/print_ledger_simple_purchase_unpaid.pdf", "F");
$this->assertFileExists(__DIR__."/file/print_ledger_simple_purchase_unpaid.pdf");
-
+print __DIR__."/file/print_ledger_simple_purchase_unpaid.pdf".PHP_EOL;
// All
//------------
$ledger=\Print_Ledger::factory($g_connection, "E", $ledger_purchase, $p_from, $p_to, "all");
@@ -112,7 +114,7 @@ class print_ledger_simpleTest extends TestCase
$ledger->export();
$ledger->Output(__DIR__."/file/print_ledger_simple_purchase_all.pdf", "F");
$this->assertFileExists(__DIR__."/file/print_ledger_simple_purchase_all.pdf");
-
+print __DIR__."/file/print_ledger_simple_purchase_all.pdf".PHP_EOL;
//-------------------------------------------------------------------------------------------------------------
// Sale
//-------------------------------------------------------------------------------------------------------------
@@ -131,6 +133,7 @@ class print_ledger_simpleTest extends TestCase
$ledger->setTitle(_("Journal Vente Payé"), true);
$ledger->export();
$ledger->Output(__DIR__."/file/print_ledger_simple_sale_paid.pdf", "F");
+print __DIR__."/file/print_ledger_simple_sale_paid.pdf".PHP_EOL;
// Unpaid
//-----------------
@@ -146,6 +149,7 @@ class print_ledger_simpleTest extends TestCase
$ledger->export();
$ledger->Output(__DIR__."/file/print_ledger_simple_sale_unpaid.pdf", "F");
$this->assertFileExists(__DIR__."/file/print_ledger_simple_sale_unpaid.pdf");
+print __DIR__."/file/print_ledger_simple_sale_unpaid.pdf".PHP_EOL;
// All
//-----------------
@@ -161,6 +165,8 @@ class print_ledger_simpleTest extends TestCase
$ledger->export();
$ledger->Output(__DIR__."/file/print_ledger_simple_sale_all.pdf", "F");
$this->assertFileExists(__DIR__."/file/print_ledger_simple_sale_all.pdf");
+print __DIR__."/file/print_ledger_simple_sale_all.pdf".PHP_EOL;
+
}
}
diff --git a/unit-test/include/class/print_ledger_simple_without_vat.classTest.php b/unit-test/include/class/print_ledger_simple_without_vatTest.php
similarity index 90%
rename from unit-test/include/class/print_ledger_simple_without_vat.classTest.php
rename to unit-test/include/class/print_ledger_simple_without_vatTest.php
index 18c35d194..3ea5826c9 100644
--- a/unit-test/include/class/print_ledger_simple_without_vat.classTest.php
+++ b/unit-test/include/class/print_ledger_simple_without_vatTest.php
@@ -33,7 +33,7 @@ class Print_Ledger_Simple_Without_VatTest extends TestCase
* @var
*/
protected $object;
-
+ private $from,$to;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
@@ -82,7 +82,8 @@ class Print_Ledger_Simple_Without_VatTest extends TestCase
$ledger->setTitle(_("Journal Achat Payé"), true);
$ledger->export();
$ledger->Output(__DIR__."/file/print_Ledger_simple_without_vat_purchase_paid.pdf", "F");
-
+ $this->assertFileExists(__DIR__."/file/print_Ledger_simple_without_vat_purchase_paid.pdf", "F");
+print __DIR__."/file/print_Ledger_simple_without_vat_purchase_paid.pdf".PHP_EOL;
// Unpaid
//------------
$ledger=new Print_Ledger_Simple_Without_Vat($g_connection,
@@ -96,6 +97,7 @@ class Print_Ledger_Simple_Without_VatTest extends TestCase
$ledger->export();
$ledger->Output(__DIR__."/file/print_Ledger_simple_without_vat_purchase_unpaid.pdf", "F");
$this->assertFileExists(__DIR__."/file/print_Ledger_simple_without_vat_purchase_unpaid.pdf");
+print __DIR__."/file/print_Ledger_simple_without_vat_purchase_unpaid.pdf".PHP_EOL;
// All
//------------
@@ -110,6 +112,7 @@ class Print_Ledger_Simple_Without_VatTest extends TestCase
$ledger->export();
$ledger->Output(__DIR__."/file/print_Ledger_simple_without_vat_purchase_all.pdf", "F");
$this->assertFileExists(__DIR__."/file/print_Ledger_simple_without_vat_purchase_all.pdf");
+print __DIR__."/file/print_Ledger_simple_without_vat_purchase_all.pdf".PHP_EOL;
//-------------------------------------------------------------------------------------------------------------
// Sale
@@ -128,6 +131,7 @@ class Print_Ledger_Simple_Without_VatTest extends TestCase
$ledger->setTitle(_("Journal Vente Payé"), true);
$ledger->export();
$ledger->Output(__DIR__."/file/print_Ledger_simple_without_vat_sale_paid.pdf", "F");
+print __DIR__."/file/print_Ledger_simple_without_vat_sale_paid.pdf".PHP_EOL;
// Unpaid
//-----------------
@@ -142,6 +146,7 @@ class Print_Ledger_Simple_Without_VatTest extends TestCase
$ledger->export();
$ledger->Output(__DIR__."/file/print_Ledger_simple_without_vat_sale_unpaid.pdf", "F");
$this->assertFileExists(__DIR__."/file/print_Ledger_simple_without_vat_sale_unpaid.pdf");
+print __DIR__."/file/print_Ledger_simple_without_vat_sale_unpaid.pdf".PHP_EOL;
// All
//-----------------
@@ -156,6 +161,7 @@ class Print_Ledger_Simple_Without_VatTest extends TestCase
$ledger->export();
$ledger->Output(__DIR__."/file/print_Ledger_simple_without_vat_sale_all.pdf", "F");
$this->assertFileExists(__DIR__."/file/print_Ledger_simple_without_vat_sale_all.pdf");
+print __DIR__."/file/print_Ledger_simple_without_vat_sale_all.pdf".PHP_EOL;
}
}