diff --git a/html/test.php b/html/test.php
index e5eeb9adc..cb3de23e0 100644
--- a/html/test.php
+++ b/html/test.php
@@ -31,16 +31,11 @@
include_once("../include/constant.php");
include_once("lib/ac_common.php");
-require_once('class/database.class.php');
-require_once ('class/dossier.class.php');
-require_once('lib/html_input.class.php');
-require_once('lib/icon_action.class.php');
-require_once ('lib/function_javascript.php');
-require_once 'class/noalyss_user.class.php';
-require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
+
+
html_page_start();
global $http;
-
+define ('TEST_UNIT',1);
$http=new HttpInput();
@@ -67,8 +62,8 @@ define('ALLOWED', 1);
load_all_script();
// To enable assert , set "zend.assertions" in the php.ini file
ini_set("assert.active",1);
-assert_options(ASSERT_ACTIVE, 1);
-assert_options(ASSERT_WARNING, 1);
+// assert_options(ASSERT_ACTIVE, 1);
+// assert_options(ASSERT_WARNING, 1);
//removed in PHP8 assert_options(ASSERT_QUIET_EVAL, 1);
function my_assert_handler($file, $line, $code)
{
@@ -77,7 +72,6 @@ function my_assert_handler($file, $line, $code)
Line '$line'
Code '$code'
| Tous les scripts | '; echo ''; - - for ($e=0; $e<$cnt_scenario; $e++) + $nb_html=count($html_files); + for ($e=0; $e<$nb_html; $e++) { - $get='test.php?'.http_build_query(array('script'=>$scenario[$e]['file'], 'gDossier'=>$gDossierLogInput, 'description'=>$scenario[$e]['desc'])); + $get='test.php?'.http_build_query(array('script'=>$html_files[$e]['file'], 'gDossier'=>$gDossierLogInput, 'description'=>$html_files[$e]['desc'])); echo '|||
| '; echo $e; echo ' | '; echo ''; echo ''; - echo $scenario[$e]['file']; + echo basename($html_files[$e]['file']); echo ''; echo ' | '; - echo ''.$scenario[$e]['desc'].' | '; + echo ''.$html_files[$e]['desc'].' | '; echo '
| '; + echo $e; + echo ' | '; + echo ''; + echo ''; + echo basename($xml_files[$e]['file']); + echo ''; + echo ' | '; + echo ''.$xml_files[$e]['desc'].' | '; + echo '
| '; + echo $e; + echo ' | '; + echo ''; + echo ''; + echo basename($lib_files[$e]['file']); + echo ''; + echo ' | '; + echo ''.$lib_files[$e]['desc'].' | '; + echo '
description = '.$description.'
';
- include '../scenario/'.$script;
+ include $script;
$end_mem=memory_get_usage();
$end_time=microtime(true);
diff --git a/include/ajax/ajax_card.php b/include/ajax/ajax_card.php
index ab74ca0f5..466ab6aae 100644
--- a/include/ajax/ajax_card.php
+++ b/include/ajax/ajax_card.php
@@ -343,7 +343,7 @@ case 'st':
}
$xml=escape_xml($html);
- header('Content-type: text/xml; charset=UTF-8');
+if (!defined("TEST_UNIT")) header('Content-type: text/xml; charset=UTF-8');
echo <<create a database
+Create dossier1 with sql/mod1/schema.sql , data.sql and constraint.sql
+exec_sql("create database ".domaine."dossier1 encoding='utf8'");
$cn=new Database(1, 'dos');
$cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/schema.sql');
$cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/data.sql');
$cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/constraint.sql');
+
+echo Dossier::name(1);
+
+?>
diff --git a/scenario/fin-confirm.php b/scenario/HTML/fin-confirm.php
similarity index 95%
rename from scenario/fin-confirm.php
rename to scenario/HTML/fin-confirm.php
index 5abb0c940..9d3922364 100644
--- a/scenario/fin-confirm.php
+++ b/scenario/HTML/fin-confirm.php
@@ -13,10 +13,10 @@ $_POST=array (
'first_sold' => '0',
'e_pj' => 'FIN1',
'e_pj_suggest' => 'FIN1',
- 'e_date' => '02.01.2014',
+ 'e_date' => '02.01.2017',
'mt' => '1415995351.0398',
'sa' => 'n',
- 'e_other0' => 'IMMOB ',
+ 'e_other0' => 'FOURNI ',
'e_other0_comment' => '',
'e_other0_amount' => '2560',
'e_concerned0' => '2',
diff --git a/scenario/fin-paiement.php b/scenario/HTML/fin-paiement.php
similarity index 100%
rename from scenario/fin-paiement.php
rename to scenario/HTML/fin-paiement.php
diff --git a/scenario/fin-record.php b/scenario/HTML/fin-record.php
similarity index 90%
rename from scenario/fin-record.php
rename to scenario/HTML/fin-record.php
index f41c47f36..3648f7ca9 100644
--- a/scenario/fin-record.php
+++ b/scenario/HTML/fin-record.php
@@ -10,17 +10,17 @@ $_POST=array (
'gDossier' => '42',
'nb_item' => '5',
'chdate' => '1',
- 'e_date' => '02.01.2014',
+ 'e_date' => '02.01.2017',
'p_jrn' => '1',
'e_pj' => 'FIN1',
'e_pj_suggest' => 'FIN1',
'first_sold' => '0',
'last_sold' => '',
'dateop0' => '',
- 'e_other0' => 'IMMOB ',
- 'e_other_name0' => 'Immo Bureau',
+ 'e_other0' => 'FOURNI',
+ 'e_other_name0' => '',
'e_other0_comment' => '',
- 'e_other0_amount' => '2560',
+ 'e_other0_amount' => '2560.12',
'e_concerned0' => '2',
'dateop1' => '',
'e_other1' => '',
diff --git a/scenario/fisto.php b/scenario/HTML/fisto.php
similarity index 100%
rename from scenario/fisto.php
rename to scenario/HTML/fisto.php
diff --git a/scenario/fsaldo.php b/scenario/HTML/fsaldo.php
similarity index 100%
rename from scenario/fsaldo.php
rename to scenario/HTML/fsaldo.php
diff --git a/scenario/historic-card.php b/scenario/HTML/historic-card.php
similarity index 100%
rename from scenario/historic-card.php
rename to scenario/HTML/historic-card.php
diff --git a/scenario/ivatnumber.test.php b/scenario/HTML/ivatnumber.test.php
similarity index 100%
rename from scenario/ivatnumber.test.php
rename to scenario/HTML/ivatnumber.test.php
diff --git a/scenario/menu-cfgled.php b/scenario/HTML/menu-cfgled.php
similarity index 100%
rename from scenario/menu-cfgled.php
rename to scenario/HTML/menu-cfgled.php
diff --git a/scenario/menu-cfgpcmn.php b/scenario/HTML/menu-cfgpcmn.php
similarity index 100%
rename from scenario/menu-cfgpcmn.php
rename to scenario/HTML/menu-cfgpcmn.php
diff --git a/scenario/menu-compta-ach.php b/scenario/HTML/menu-compta-ach.php
similarity index 100%
rename from scenario/menu-compta-ach.php
rename to scenario/HTML/menu-compta-ach.php
diff --git a/scenario/menufin.php b/scenario/HTML/menufin.php
similarity index 100%
rename from scenario/menufin.php
rename to scenario/HTML/menufin.php
diff --git a/scenario/ods-new.php b/scenario/HTML/ods-new.php
similarity index 100%
rename from scenario/ods-new.php
rename to scenario/HTML/ods-new.php
diff --git a/scenario/package_repository.test.php b/scenario/HTML/package_repository.test.php
similarity index 100%
rename from scenario/package_repository.test.php
rename to scenario/HTML/package_repository.test.php
diff --git a/scenario/pdf_operation.php b/scenario/HTML/pdf_operation.php
similarity index 100%
rename from scenario/pdf_operation.php
rename to scenario/HTML/pdf_operation.php
diff --git a/scenario/test_acc_plan_mtable.php b/scenario/HTML/test_acc_plan_mtable.php
similarity index 100%
rename from scenario/test_acc_plan_mtable.php
rename to scenario/HTML/test_acc_plan_mtable.php
diff --git a/scenario/test_currency_mtable.php b/scenario/HTML/test_currency_mtable.php
similarity index 100%
rename from scenario/test_currency_mtable.php
rename to scenario/HTML/test_currency_mtable.php
diff --git a/scenario/test_postgres_json_array.php b/scenario/HTML/test_postgres_json_array.php
similarity index 100%
rename from scenario/test_postgres_json_array.php
rename to scenario/HTML/test_postgres_json_array.php
diff --git a/scenario/tva_parameter.php b/scenario/HTML/tva_parameter.php
similarity index 100%
rename from scenario/tva_parameter.php
rename to scenario/HTML/tva_parameter.php
diff --git a/scenario/vehisto b/scenario/HTML/vehisto
similarity index 100%
rename from scenario/vehisto
rename to scenario/HTML/vehisto
diff --git a/scenario/ven-call-menu.php b/scenario/HTML/ven-call-menu.php
similarity index 100%
rename from scenario/ven-call-menu.php
rename to scenario/HTML/ven-call-menu.php
diff --git a/scenario/HtmlInput.test.php b/scenario/LIB/HtmlInput.test.php
similarity index 79%
rename from scenario/HtmlInput.test.php
rename to scenario/LIB/HtmlInput.test.php
index 0a0c1e02f..bc8425cac 100644
--- a/scenario/HtmlInput.test.php
+++ b/scenario/LIB/HtmlInput.test.php
@@ -27,27 +27,6 @@
* @brief Test the HtmlInput object it means the Inum, IText , ...
*/
-require_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
-require_once NOALYSS_INCLUDE.'/lib/iaction.class.php';
-require_once NOALYSS_INCLUDE.'/lib/ibutton.class.php';
-require_once NOALYSS_INCLUDE.'/lib/icard.class.php';
-require_once NOALYSS_INCLUDE.'/lib/icheckbox.class.php';
-require_once NOALYSS_INCLUDE.'/lib/iconcerned.class.php';
-require_once NOALYSS_INCLUDE.'/lib/idate.class.php';
-require_once NOALYSS_INCLUDE.'/lib/ifile.class.php';
-require_once NOALYSS_INCLUDE.'/lib/ihidden.class.php';
-require_once NOALYSS_INCLUDE.'/lib/inum.class.php';
-require_once NOALYSS_INCLUDE.'/lib/iperiod.class.php';
-require_once NOALYSS_INCLUDE.'/lib/iposte.class.php';
-require_once NOALYSS_INCLUDE.'/lib/iradio.class.php';
-require_once NOALYSS_INCLUDE.'/lib/irelated_action.class.php';
-require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
-require_once NOALYSS_INCLUDE.'/lib/ispan.class.php';
-require_once NOALYSS_INCLUDE.'/lib/itext.class.php';
-require_once NOALYSS_INCLUDE.'/lib/itextarea.class.php';
-require_once NOALYSS_INCLUDE.'/lib/itva_popup.class.php';
-require_once NOALYSS_INCLUDE.'/lib/input_switch.class.php';
-require_once NOALYSS_INCLUDE.'/lib/input_checkbox.class.php';
$http=new HttpInput();
?>
diff --git a/scenario/html_tab.test.php b/scenario/LIB/html_tab.test.php
similarity index 95%
rename from scenario/html_tab.test.php
rename to scenario/LIB/html_tab.test.php
index f629ef7ba..b2ab6dbbb 100644
--- a/scenario/html_tab.test.php
+++ b/scenario/LIB/html_tab.test.php
@@ -26,8 +26,7 @@ if (!defined('ALLOWED'))
* @file
* @brief Test of Html_Tab and Output_Html_Tab
*/
-require_once NOALYSS_INCLUDE.'/lib/html_tab.class.php';
-require_once NOALYSS_INCLUDE.'/lib/output_html_tab.class.php';
+
$tab = new Html_Tab('tab1',_("Titre 1"));
$tab->set_mode('link');
diff --git a/scenario/icon_actionTest.php b/scenario/LIB/icon_actionTest.php
similarity index 100%
rename from scenario/icon_actionTest.php
rename to scenario/LIB/icon_actionTest.php
diff --git a/scenario/inplace_edit.test.php b/scenario/LIB/inplace_edit.test.php
similarity index 100%
rename from scenario/inplace_edit.test.php
rename to scenario/LIB/inplace_edit.test.php
diff --git a/scenario/progress-bar.test.php b/scenario/LIB/progress-bar.test.php
similarity index 99%
rename from scenario/progress-bar.test.php
rename to scenario/LIB/progress-bar.test.php
index f7fdb68e6..7bef62a8c 100644
--- a/scenario/progress-bar.test.php
+++ b/scenario/LIB/progress-bar.test.php
@@ -1,4 +1,4 @@
-
diff --git a/scenario/select-box-test.php b/scenario/LIB/select-box-test.php
similarity index 100%
rename from scenario/select-box-test.php
rename to scenario/LIB/select-box-test.php
diff --git a/scenario/smoke.php b/scenario/LIB/smoke.php
similarity index 73%
rename from scenario/smoke.php
rename to scenario/LIB/smoke.php
index fa7e2e7f4..75c772b7b 100644
--- a/scenario/smoke.php
+++ b/scenario/LIB/smoke.php
@@ -36,14 +36,17 @@
smoke prompt
- function func_callback_prompt(ev)
+
+ function func_callback_prompt(ev)
{
if (ev) { alert ("accepted "+ev);}
console.debug(ev);
return true;
}
-
-smoke.prompt('Confirmez-vous',func_callback_prompt,{title:"Titre"});
+ function smoke_prompt()
+ {
+ smoke.prompt('Donnez un élement',func_callback_prompt,{title:"Titre"});
+ }
+ smoke signal
+
+
+
+
+
+ function signal() { smoke.signal('Sauvé',function(e){},{duration:500}); }
+
+
+
diff --git a/scenario/test_manage_table_sql.php b/scenario/LIB/test_manage_table_sql.php
similarity index 100%
rename from scenario/test_manage_table_sql.php
rename to scenario/LIB/test_manage_table_sql.php
diff --git a/scenario/XML/ajax-add-card-category.php b/scenario/XML/ajax-add-card-category.php
new file mode 100644
index 000000000..0d3a9ecea
--- /dev/null
+++ b/scenario/XML/ajax-add-card-category.php
@@ -0,0 +1,34 @@
+ '42',
+ 'ctl' => 'select_card_div',
+ 'op' => 'card',
+ 'op2'=>'st',
+ 'fil' => '-1',
+ 'ledger' => '2',
+);
+$_POST['gDossier']=$gDossierLogInput;
+$_GET['gDossier']=$gDossierLogInput;
+ $_REQUEST=array_merge($_GET,$_POST);
+ define ('TEST_UNIT',1);
+ob_start();
+ include NOALYSS_HOME.'/ajax_misc.php';
+$output=ob_get_clean();
+echo '
';
+$xml=simplexml_load_string($output);
+print "ctl {$xml->ctl}";
+echo '
';
+print "code ";
+print '';
+echo htmlentities($xml->code);
+echo '';
+
+echo '
';
+print "fiche_cat ";
+print_r($xml->fiche_cat);
+echo '
';
+
diff --git a/scenario/ajax-detail-operation1.php b/scenario/XML/ajax-detail-operation1.php
similarity index 64%
rename from scenario/ajax-detail-operation1.php
rename to scenario/XML/ajax-detail-operation1.php
index 8874afe42..fe86b7932 100644
--- a/scenario/ajax-detail-operation1.php
+++ b/scenario/XML/ajax-detail-operation1.php
@@ -3,7 +3,7 @@
$_GET=array (
'op' => 'ledger',
'act' => 'de',
- 'jr_id' => '2856',
+ 'jr_id' => '137',
'div' => 'det2',
);
$_POST=array (
@@ -11,4 +11,10 @@ $_POST=array (
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
+define ('TEST_UNIT',1);
+ob_start();
include 'ajax_misc.php';
+$output=ob_get_contents();
+ob_clean();
+echo unescape_xml($output);
+ echo htmlentities($output);
diff --git a/scenario/ajax-detail-operation2.php b/scenario/XML/ajax-detail-operation2.php
similarity index 56%
rename from scenario/ajax-detail-operation2.php
rename to scenario/XML/ajax-detail-operation2.php
index 1ef2ce551..3e5d80df1 100644
--- a/scenario/ajax-detail-operation2.php
+++ b/scenario/XML/ajax-detail-operation2.php
@@ -1,9 +1,9 @@
'ledger',
'act' => 'de',
- 'jr_id' => '2870',
+ 'jr_id' => '147',
'div' => 'det2',
);
$_POST=array (
@@ -11,4 +11,10 @@ $_POST=array (
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
+define ('TEST_UNIT',1);
+ob_start();
include 'ajax_misc.php';
+$output=ob_get_contents();
+ob_clean();
+echo unescape_xml($output);
+echo htmlentities($output);
diff --git a/scenario/ajax-detail-operation3.php b/scenario/XML/ajax-detail-operation3.php
similarity index 60%
rename from scenario/ajax-detail-operation3.php
rename to scenario/XML/ajax-detail-operation3.php
index a14539381..25521f044 100644
--- a/scenario/ajax-detail-operation3.php
+++ b/scenario/XML/ajax-detail-operation3.php
@@ -3,12 +3,17 @@
$_GET=array (
'op' => 'ledger',
'act' => 'de',
- 'jr_id' => '3532',
+ 'jr_id' => '213',
'div' => 'det2',
);
$_POST=array (
);
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
- $_REQUEST=array_merge($_GET,$_POST);
+define ('TEST_UNIT',1);
+ob_start();
include 'ajax_misc.php';
+$output=ob_get_contents();
+ob_clean();
+echo unescape_xml($output);
+echo htmlentities($output);
diff --git a/scenario/ajax-detail-operation4.php b/scenario/XML/ajax-detail-operation4.php
similarity index 63%
rename from scenario/ajax-detail-operation4.php
rename to scenario/XML/ajax-detail-operation4.php
index 92f1ca8f3..5e07c7266 100644
--- a/scenario/ajax-detail-operation4.php
+++ b/scenario/XML/ajax-detail-operation4.php
@@ -3,7 +3,7 @@
$_GET=array (
'op'=>"ledger",
'act' => 'de',
- 'jr_id' => '2826',
+ 'jr_id' => '316',
'div' => 'det2',
);
$_POST=array (
@@ -11,4 +11,10 @@ $_POST=array (
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
+define ('TEST_UNIT',1);
+ob_start();
include 'ajax_misc.php';
+$output=ob_get_contents();
+ob_clean();
+echo unescape_xml($output);
+echo htmlentities($output);
diff --git a/scenario/ach-new.php b/scenario/ach-new.php
deleted file mode 100644
index 48501bb35..000000000
--- a/scenario/ach-new.php
+++ /dev/null
@@ -1,34 +0,0 @@
- '42',
- 'ac' => 'COMPTA/MENUACH/ACH',
-);
-$_POST=array (
- 'gDossier' => '42',
- 'nb_item' => '1',
- 'p_jrn' => '3',
- 'e_date' => '01.03.2016',
- 'e_ech' => '',
- 'e_client' => 'IMMOB',
- 'e_pj' => 'ACH1',
- 'e_pj_suggest' => 'ACH1',
- 'e_comm' => 'Loyer',
- 'e_march0' => 'LOYER',
- 'e_march0_price' => '2560',
- 'e_quant0' => '1',
- 'htva_march0' => '2560',
- 'e_march0_tva_id' => '4',
- 'e_march0_tva_amount' => '0',
- 'tva_march0' => '0',
- 'tvac_march0' => '2560',
- 'jrn_type' => 'ACH',
- 'p_action' => 'ach',
- 'sa' => 'p',
- 'e_mp' => '0',
- 'view_invoice' => 'Enregistrer',
-);
-$_POST['gDossier']=$gDossierLogInput;
-$_GET['gDossier']=$gDossierLogInput;
- $_REQUEST=array_merge($_GET,$_POST);
-include 'compta_ach.inc.php';
diff --git a/scenario/ajax-add-card-category.php b/scenario/ajax-add-card-category.php
deleted file mode 100644
index 10aeab903..000000000
--- a/scenario/ajax-add-card-category.php
+++ /dev/null
@@ -1,16 +0,0 @@
- '42',
- 'ctl' => 'select_card_div',
- 'op' => 'card',
- 'op2'=>'st',
- 'fil' => '-1',
- 'ledger' => '2',
-);
-$_POST=array (
-);
-$_POST['gDossier']=$gDossierLogInput;
-$_GET['gDossier']=$gDossierLogInput;
- $_REQUEST=array_merge($_GET,$_POST);
-include NOALYSS_HOME.'/ajax_misc.php';
diff --git a/scenario/ajax-save-operation.php b/scenario/ajax-save-operation.php
deleted file mode 100644
index 80fdd7365..000000000
--- a/scenario/ajax-save-operation.php
+++ /dev/null
@@ -1,37 +0,0 @@
- 'det2',
- 'jr_id' => '2856',
- 'gDossier' => '27',
- 'p_date' => '05.12.2013',
- 'p_ech' => '',
- 'p_date_paid' => '',
- 'npj' => 'ACH607',
- 'lib' => 'Consommable, ptit matériel',
- 'jrn_note' => '',
- 'j_id' =>
- array (
- 0 => '7629',
- 1 => '7630',
- ),
- 'BON_COMMANDE' => '',
- 'OTHER' => '',
- 'raptdet2' => '',
- 'related' => '327,231,330',
- 'Fermer' => 'Fermer',
- 'save' => 'Sauver',
- 'Effacer' => 'Effacer',
- 'bextdet2' => 'Extourner',
- 'rapt' => '',
- 'div' => 'det2',
- 'act' => 'save',
- 'op'=>'ledger',
- 'jr_optype'=>'NOR'
-);
-$_POST['gDossier']=$gDossierLogInput;
-$_GET['gDossier']=$gDossierLogInput;
- $_REQUEST=array_merge($_GET,$_POST);
-include 'ajax_misc.php';
diff --git a/scenario/ajax_acc_plan_mtable.php b/scenario/ajax_acc_plan_mtable.php
deleted file mode 100644
index c782969ca..000000000
--- a/scenario/ajax_acc_plan_mtable.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-if (!defined('ALLOWED'))
- die('Appel direct ne sont pas permis');
-if ( ! defined ("AJAX_TEST")) {
- echo "Can not be called directly but via ajax_test.php";
- return;
-}
-/**
- * @file
- * @brief Test the ajax call from test_manage_table_sql.php
- */
-$http=new HttpInput();
-try {
-$table=$http->request('table');
-$action=$http->request('action');
-$p_id=$http->request('p_id', "number");
-$ctl_id=$http->request('ctl');
-} catch(Exception $e) {
- echo $e->getMessage();
-}
-require_once NOALYSS_INCLUDE."/lib/manage_table_sql.class.php";
-require_once NOALYSS_INCLUDE."/class/acc_plan_mtable.class.php";
-
-$obj=new Acc_Plan_SQL($cn);
-$obj->set_limit_fiche_qcode(5);
-$obj->set_pk_value($p_id);
-$obj->load();
-$manage_table=new Acc_Plan_MTable($obj);
-$manage_table->add_json_param("TestAjaxFile",
- NOALYSS_HOME."/../scenario/ajax_acc_plan_mtable.php");
-$manage_table->set_object_name($ctl_id);
-$manage_table->set_callback("ajax_test.php");
-if ($action=="input")
-{
- header('Content-type: text/xml; charset=UTF-8');
- echo $manage_table->ajax_input()->saveXML();
- return;
-}
-elseif ($action == "save")
-{
- $xml=$manage_table->ajax_save();
- header('Content-type: text/xml; charset=UTF-8');
- echo $xml->saveXML();
-}
\ No newline at end of file
diff --git a/scenario/ajax_manage_table_sql.php b/scenario/ajax_manage_table_sql.php
deleted file mode 100644
index d7401060b..000000000
--- a/scenario/ajax_manage_table_sql.php
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-if (!defined('ALLOWED'))
- die('Appel direct ne sont pas permis');
-if ( ! defined ("AJAX_TEST")) {
- echo "Can not be called directly but via AJAX";
- return;
-}
-/**
- * @file
- * @brief Test the ajax call from test_manage_table_sql.php
- */
-$http=new HttpInput();
-try {
-$table=$http->request('table');
-$action=$http->request('action');
-$p_id=$http->request('p_id', "number");
-$ctl_id=$http->request('ctl');
-} catch(Exception $e) {
-
- echo $e->getMessage();
-}
-require_once NOALYSS_INCLUDE."/lib/manage_table_sql.class.php";
-require_once NOALYSS_INCLUDE."/database/acc_plan_sql.class.php";
-
-
-
-if ($action=="input")
-{
- $obj=new Acc_Plan_SQL($cn);
- $obj->set_limit_fiche_qcode(5);
- $obj->set_pk_value($p_id);
- $obj->load();
- $manage_table=new Manage_Table_SQL($obj);
- $manage_table->add_json_param("TestAjaxFile",
- NOALYSS_HOME."/../scenario/ajax_manage_table_sql.php");
-
- $manage_table->set_object_name($ctl_id);
- $manage_table->set_col_label('pcm_val', "Poste");
- $manage_table->set_col_label('parent_accounting', "Dépend");
- $manage_table->set_col_label('pcm_lib', "Libellé");
- $manage_table->set_col_label('pcm_type',
- "Type de menu".Icon_Action::infobulle(33));
- header('Content-type: text/xml; charset=UTF-8');
- echo $manage_table->ajax_input()->saveXML();
- return;
-} elseif ($action=="save")
-{
-$obj=new Acc_Plan_SQL($cn);
- $obj->set_limit_fiche_qcode(5);
- $obj->set_pk_value($p_id);
- $obj->load();
- $manage_table=new Manage_Table_SQL($obj);
- $manage_table->set_object_name($ctl_id);
- $manage_table->add_json_param("TestAjaxFile",
- NOALYSS_HOME."/../scenario/ajax_manage_table_sql.php");
- header('Content-type: text/xml; charset=UTF-8');
- echo $manage_table->ajax_save()->saveXML();
- return;
-}
\ No newline at end of file
diff --git a/scenario/cfgpcm-ajout-poste.php b/scenario/cfgpcm-ajout-poste.php
deleted file mode 100644
index a85711b3a..000000000
--- a/scenario/cfgpcm-ajout-poste.php
+++ /dev/null
@@ -1,19 +0,0 @@
- '42',
- 'ac' => 'PARAM/C0PCMN',
-);
-$_POST=array (
- 'p_action' => 'pcmn',
- 'gDossier' => '42',
- 'p_val' => '4519',
- 'p_lib' => 'Compte TVA',
- 'p_parent' => '451',
- 'p_type' => 'ACT',
- 'Ajout' => 'Ajout',
-);
-$_POST['gDossier']=$gDossierLogInput;
-$_GET['gDossier']=$gDossierLogInput;
- $_REQUEST=array_merge($_GET,$_POST);
-include 'param_pcmn.inc.php';
diff --git a/scenario/comptabilite_analytique.php b/scenario/comptabilite_analytique.php
deleted file mode 100644
index 508a814a6..000000000
--- a/scenario/comptabilite_analytique.php
+++ /dev/null
@@ -1,42 +0,0 @@
-get_array(
- "select j_id from jrnx join jrn on (jr_grpt_id=j_grpt)
- where
- jr_id=$1
- ", array(48));
-$nb = count($a_jrnxId);
-
-for ($i = 0; $i<$nb; $i++) {
-// First row
- $a = $anc->get_by_jid($a_jrnxId[$i]['j_id']);
- if (! empty($a) ) {
- $complete=$anc->to_request($a, 1);
- var_dump($complete);
- }
-}
diff --git a/scenario/ods-confirm.php b/scenario/ods-confirm.php
deleted file mode 100644
index 0868b2879..000000000
--- a/scenario/ods-confirm.php
+++ /dev/null
@@ -1,35 +0,0 @@
- '42',
- 'ac' => 'COMPTA/MENUODS/ODS',
-);
-$_POST=array (
- 'ac' => 'COMPTA/MENUODS/ODS',
- 'e_date' => '14.11.2014',
- 'desc' => 'TVA',
- 'period' => '102',
- 'e_pj' => 'ODS1',
- 'e_pj_suggest' => 'ODS1',
- 'mt' => '1415996970.8822',
- 'e_comm' => 'TVA',
- 'jrn_type' => 'ODS',
- 'p_jrn' => '4',
- 'nb_item' => '5',
- 'jrn_concerned' => '',
- 'gDossier' => '42',
- 'poste0' => '4519',
- 'ld0' => 'Compte TVA',
- 'amount0' => '250',
- 'poste1' => '6700',
- 'ld1' => 'Paiement TVA',
- 'amount1' => '250',
- 'ck1' => '',
- 'opd_name' => 'Paiement TVA',
- 'od_description' => '',
- 'save' => 'Confirmer',
-);
-$_POST['gDossier']=$gDossierLogInput;
-$_GET['gDossier']=$gDossierLogInput;
- $_REQUEST=array_merge($_GET,$_POST);
-include 'compta_ods.inc.php';
diff --git a/scenario/ods-record.php b/scenario/ods-record.php
deleted file mode 100644
index efb976484..000000000
--- a/scenario/ods-record.php
+++ /dev/null
@@ -1,44 +0,0 @@
- '42',
- 'ac' => 'COMPTA/MENUODS/ODS',
-);
-$_POST=array (
- 'gDossier' => '42',
- 'ac' => 'COMPTA/MENUODS/ODS',
- 'p_jrn' => '4',
- 'e_date' => '14.11.2016',
- 'e_pj' => 'ODS1',
- 'e_pj_suggest' => 'ODS1',
- 'desc' => 'TVA',
- 'nb_item' => '5',
- 'jrn_type' => 'ODS',
- 'qc_0' => '',
- 'poste0' => '4519',
- 'ld0' => 'Compte TVA',
- 'amount0' => '250',
- 'qc_1' => '',
- 'poste1' => '6700',
- 'ld1' => 'Paiement TVA',
- 'amount1' => '250',
- 'ck1' => '',
- 'qc_2' => '',
- 'poste2' => '',
- 'ld2' => '',
- 'amount2' => '',
- 'qc_3' => '',
- 'poste3' => '',
- 'ld3' => '',
- 'amount3' => '',
- 'qc_4' => '',
- 'poste4' => '',
- 'ld4' => '',
- 'amount4' => '',
- 'jrn_concerned' => '',
- 'summary' => 'Sauvez',
-);
-$_POST['gDossier']=$gDossierLogInput;
-$_GET['gDossier']=$gDossierLogInput;
- $_REQUEST=array_merge($_GET,$_POST);
-include 'compta_ods.inc.php';
diff --git a/scenario/readme.txt b/scenario/readme.txt
index 71fd91f97..1301e66ec 100644
--- a/scenario/readme.txt
+++ b/scenario/readme.txt
@@ -37,7 +37,16 @@ L'objectif étant de pouvoir tester et de rejouer facilement les actions que vou
Il est aussi possible de faire vos tests unitaire ici , autrement qu'avec PHPUNIT (voir répertiore php-unit)
+Vous pouver l'utiliser pour les sorties ajax, mises au point de librarie, scénario , cela permet de tester les
+fichiers à include (.inc.php) , les exports , les réponses ajax et appeler les fonctions test_me dans les classes
+(static function test_me() ).
+Dans votre code, vous pouvez ajouter des portions de code ainsi
+
+ if (defined ('TEST_UNIT')) {
+ // exécuté uniquement si appelé pour les tests unitaires
+
+ }
-----------------------
ENGLISH
-----------------------
@@ -55,5 +64,11 @@ You point you browser noalyss/html/test.php an you click on the link with the
and you can rerun the file , it works also for ajax.
-It is useful to test ajax answer , unit test or testing a class
+It is useful to test ajax answer , unit test or testing a class (with static function test_me() )
+In your code, you can do
+
+ if (defined ('TEST_UNIT')) {
+ // executed only if calling script is test.php,
+
+ }
\ No newline at end of file
diff --git a/scenario/ven-new.php b/scenario/ven-new.php
deleted file mode 100644
index d86305fa8..000000000
--- a/scenario/ven-new.php
+++ /dev/null
@@ -1,43 +0,0 @@
- '42',
- 'ac' => 'COMPTA/VENMENU/VEN',
-);
-$_POST=array (
- 'ledger_type' => 'VEN',
- 'ac' => 'COMPTA/VENMENU/VEN',
- 'sa' => 'p',
- 'gDossier' => '42',
- 'nb_item' => '2',
- 'p_jrn' => '2',
- 'e_date' => '14.11.2016',
- 'e_ech' => '',
- 'e_client' => 'CLIENT1 ',
- 'e_pj' => 'VEN1',
- 'e_pj_suggest' => 'VEN1',
- 'e_comm' => 'Première vente',
- 'e_march0' => 'DEPLAC',
- 'e_march0_price' => '120',
- 'e_quant0' => '1',
- 'htva_march0' => '120',
- 'e_march0_tva_id' => '1',
- 'e_march0_tva_amount' => '25.2',
- 'tva_march0' => '25.2',
- 'tvac_march0' => '145.2',
- 'e_march1' => '',
- 'e_march1_price' => '',
- 'e_quant1' => '1',
- 'htva_march1' => '0',
- 'e_march1_tva_id' => '',
- 'e_march1_tva_amount' => '',
- 'tva_march1' => '0',
- 'tvac_march1' => '0',
- 'jrn_type' => 'VEN',
- 'e_mp' => '0',
- 'view_invoice' => 'Enregistrer',
-);
-$_POST['gDossier']=$gDossierLogInput;
-$_GET['gDossier']=$gDossierLogInput;
- $_REQUEST=array_merge($_GET,$_POST);
-include 'compta_ven.inc.php';
diff --git a/scenario/ven-record.php b/scenario/ven-record.php
deleted file mode 100644
index 5c119ee4b..000000000
--- a/scenario/ven-record.php
+++ /dev/null
@@ -1,40 +0,0 @@
- '42',
- 'ac' => 'COMPTA/VENMENU/VEN',
-);
-$_POST=array (
- 'gDossier' => '42',
- 'bon_comm' => '',
- 'other_info' => '',
- 'e_client' => 'CLIENT1 ',
- 'nb_item' => '2',
- 'p_jrn' => '2',
- 'mt' => '1415995185.7619',
- 'e_comm' => 'Première vente',
- 'e_date' => '14.11.2016',
- 'e_ech' => '',
- 'e_pj' => 'VEN1',
- 'e_pj_suggest' => 'VEN1',
- 'e_mp' => '0',
- 'jrn_type' => 'VEN',
- 'e_march0' => 'DEPLAC',
- 'e_march0_price' => '120',
- 'e_march0_tva_id' => '1',
- 'e_march0_tva_amount' => '25.2',
- 'e_quant0' => '1',
- 'e_march1' => '',
- 'e_march1_price' => '',
- 'e_march1_tva_id' => '',
- 'e_march1_tva_amount' => '',
- 'e_quant1' => '1',
- 'ac' => 'COMPTA/VENMENU/VEN',
- 'opd_name' => '',
- 'od_description' => '',
- 'record' => 'Enregistrement',
-);
-$_POST['gDossier']=$gDossierLogInput;
-$_GET['gDossier']=$gDossierLogInput;
- $_REQUEST=array_merge($_GET,$_POST);
-include 'compta_ven.inc.php';