PHPUNIT
Acc_TVA : tva_code must contains at least one letter Acc_Ledger : input_new PDF_Anc_Acc_ListTest:testPdf_Card Fix bug sizIe
This commit is contained in:
parent
2810a32db6
commit
cbaed83ec8
5 changed files with 11 additions and 8 deletions
|
|
@ -2874,7 +2874,7 @@ class Acc_Ledger extends jrn_def_sql
|
|||
}
|
||||
|
||||
/**
|
||||
* display screen to enter a new ledger
|
||||
* @brief display FORM to enter parameters to create a new ledger.
|
||||
*/
|
||||
function input_new()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class Acc_TVATest extends TestCase
|
|||
return array(
|
||||
['abc',true]
|
||||
,['13A',true]
|
||||
,['1',true]
|
||||
,['1',false]
|
||||
,['1-A',false]
|
||||
,['+a',false]
|
||||
,['abcdefg',false]
|
||||
|
|
@ -96,7 +96,7 @@ class Acc_TVATest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* @testdox check TVA_CODE value
|
||||
* @testdox check TVA_CODE value must constains digit and letter
|
||||
* @dataProvider dataCheck
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ class Acc_LedgerTest extends TestCase
|
|||
return $dataSet;
|
||||
}
|
||||
/**
|
||||
* Get an operation
|
||||
* @brief Get an operation
|
||||
* @global type $g_connection
|
||||
* @return type20
|
||||
* @return int
|
||||
*/
|
||||
private function get_jrn_id($p_ledger='ODS')
|
||||
{
|
||||
|
|
@ -886,7 +886,10 @@ class Acc_LedgerTest extends TestCase
|
|||
*/
|
||||
public function testInput_new()
|
||||
{
|
||||
global $g_connection;
|
||||
put_global([["key"=>"ac","value"=>"ODS"]]);
|
||||
$check_fichedef=$g_connection->get_value("select count(*) from fiche_def");
|
||||
$this->assertEquals(7, $check_fichedef,"too many fiche_def");
|
||||
ob_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
|
||||
|
|
@ -896,7 +899,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 == 16320 || $size == 15644 ," output input_new is not what it is expected");
|
||||
$this->assertTrue($size == 15653 ," output input_new is not what it is expected");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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==10345||$filesize==9678,"Size of the html string for display_search_form see "
|
||||
$this->assertTrue($filesize==11288,"Size of the html string for display_search_form see "
|
||||
. __DIR__."/file/acc_ledger_search-test_display_search_form.html ");
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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 >= 77104 && $filesize <= 77289,
|
||||
$this->assertTrue($filesize >= 77102 && $filesize <= 77289,
|
||||
__DIR__."/file/pdf_anc_acc_list-card-activity.pdf $filesize incorrect");
|
||||
|
||||
// By Account / Activity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue