SCENARIO TEST : improve scenario et documentation. Load files from folders

This commit is contained in:
sparkyx 2024-11-04 10:20:44 +01:00
parent 4a89425bc2
commit 63e2566275
19 changed files with 553 additions and 119 deletions

View file

@ -69,6 +69,8 @@ if ( LOGINPUT)
fwrite($file_loginput,"\n");
fwrite($file_loginput,' $_REQUEST=array_merge($_GET,$_POST);');
fwrite($file_loginput,"\n");
fwrite($file_loginput,' require_once NOALYSS_INCLUDE."/export/$prfile";');
fwrite($file_loginput,"\n");
fclose($file_loginput);
}

View file

@ -25,6 +25,8 @@
* - first do not forget to create the authorized_debug file in the html folder
* - secund the test must be adapted to this page : if you do a post (or get) from a test, you won't get any result
* if the $_REQUEST[test_select] is not set, so set it .
*
*
*/
@ -33,6 +35,7 @@ include_once("../include/constant.php");
include_once("lib/ac_common.php");
html_page_start();
global $http;
define ('TEST_UNIT',1);
@ -63,6 +66,25 @@ if (!file_exists('authorized_debug'))
exit();
}
define('ALLOWED', 1);
global $aAvaible_module;
/*
* Find all the folder
*/
$directory=NOALYSS_BASE."/scenario";
$folder=scandir($directory);
$nb_folder=count($folder);
for ($i=0; $i<$nb_folder;$i++)
{
if (is_dir("{$directory}/".$folder[$i]) && $folder[$i] != '.' && $folder[$i] !='..')
{
$aAvaible_module[]=$folder[$i];
}
}
load_all_script();
// To enable assert , set "zend.assertions" in the php.ini file
/******************************************************************************************************************/
@ -116,10 +138,48 @@ function retrieve_files($directory) :array
}
return $scenario;
}
function display_test($title,$gDossierLogInput,$aHtml_files)
{
echo h1($title);
$get='test.php?'.http_build_query(array('script'=>"all", 'gDossier'=>$gDossierLogInput, 'description'=>"Tous les scripts",'module'=>$title));
echo '<table style="collapse: false;border-spacing: 1rem">';
echo '<tr>';
echo '<td>';
echo '<a href="'.$get.'" target="_blank">';
echo "Tous les tests du module $title ";
echo '</a>';
echo '</td>';
echo '<td>';
echo '<a href="'.$get.'" target="_blank">';
echo 'Tous les scripts';
echo '</a>';
echo '</td>';
echo '</tr>';
$nb_html=count($aHtml_files);
for ($e=0; $e<$nb_html; $e++)
{
$get='test.php?'.http_build_query(array('script'=>$aHtml_files[$e]['file'], 'gDossier'=>$gDossierLogInput, 'description'=>$aHtml_files[$e]['desc']));
echo '<tr>';
echo '<td>';
echo $e;
echo '</td>';
echo '<td>';
echo '<a href="'.$get.'" target="_blank">';
echo basename($aHtml_files[$e]['file']);
echo '</a>';
echo '</td>';
echo '<td>'.$aHtml_files[$e]['desc'].'</td>';
echo '</tr>';
}
echo '</table>';
}
$html_files=retrieve_files(NOALYSS_BASE.'/scenario/HTML');
$xml_files=retrieve_files(NOALYSS_BASE.'/scenario/XML');
$lib_files=retrieve_files(NOALYSS_BASE.'/scenario/LIB');
$script=$http->request('script', "string",'');
$min=$cn->get_value("select p_id from parm_periode order by p_start asc limit 1");
@ -134,96 +194,42 @@ if ($script=="")
* avec une description
*/
echo h1('HTML');
echo '<table>';
$get='test.php?'.http_build_query(array('script'=>"all", 'gDossier'=>$gDossierLogInput, 'description'=>"Tous les scripts"));
echo '<tr>';
echo '<td>';
echo '<a href="'.$get.'" target="_blank">';
echo "Tous ";
echo '</a>';
echo '</td>';
echo '<td>Tous les scripts</td>';
echo '</tr>';
$nb_html=count($html_files);
for ($e=0; $e<$nb_html; $e++)
{
$get='test.php?'.http_build_query(array('script'=>$html_files[$e]['file'], 'gDossier'=>$gDossierLogInput, 'description'=>$html_files[$e]['desc']));
echo '<tr>';
echo '<td>';
echo $e;
echo '</td>';
echo '<td>';
echo '<a href="'.$get.'" target="_blank">';
echo basename($html_files[$e]['file']);
echo '</a>';
echo '</td>';
echo '<td>'.$html_files[$e]['desc'].'</td>';
echo '</tr>';
print '<p class="alert-primary p-2 w-50">';
printf( '<a href="%s" target="_blank"> Tous les test </a>',$get);
print '</p>';
foreach ($aAvaible_module as $mod) {
$html_files = retrieve_files(NOALYSS_BASE . '/scenario/' . $mod);
display_test($mod,$gDossierLogInput,$html_files);
}
echo '</table>';
echo h1('XML');
echo '<table>';
$nb_xml=count($xml_files);
for ($e=0; $e<$nb_xml; $e++)
{
$get='test.php?'.http_build_query(array('script'=>$xml_files[$e]['file'], 'gDossier'=>$gDossierLogInput, 'description'=>$xml_files[$e]['desc']));
echo '<tr>';
echo '<td>';
echo $e;
echo '</td>';
echo '<td>';
echo '<a href="'.$get.'" target="_blank">';
echo basename($xml_files[$e]['file']);
echo '</a>';
echo '</td>';
echo '<td>'.$xml_files[$e]['desc'].'</td>';
echo '</tr>';
}
echo '</table>';
echo h1('Libraries');
echo '<table>';
$nb_lib=count($lib_files);
for ($e=0; $e<$nb_lib; $e++)
{
$get='test.php?'.http_build_query(array('script'=>$lib_files[$e]['file'], 'gDossier'=>$gDossierLogInput, 'description'=>$lib_files[$e]['desc']));
echo '<tr>';
echo '<td>';
echo $e;
echo '</td>';
echo '<td>';
echo '<a href="'.$get.'" target="_blank">';
echo basename($lib_files[$e]['file']);
echo '</a>';
echo '</td>';
echo '<td>'.$lib_files[$e]['desc'].'</td>';
echo '</tr>';
}
echo '</table>';
}
else if ($script=='all')
{
$nb=$http->get('nb_script', "number",0);
$nb=$http->get('nb_script', "number",1);
$start_mem=memory_get_usage();
$start_time=microtime(true);
$script=noalyss_str_replace('../', '', $script);
$module=$http->get('module','string','all');
$scenario=[];
if ($module=='all') {
foreach ($aAvaible_module as $mod) {
$html_files = retrieve_files(NOALYSS_BASE . '/scenario/' . $mod);
$scenario = array_merge($html_files, $scenario);
}
} elseif (in_array($module, $aAvaible_module) ) {
$scenario=retrieve_files(NOALYSS_BASE.'/scenario/'.$module);
}
$maxscan=$http->get('nb_script', "number",count($scenario)-1);
$maxscan++;
for ($i=$nb;$i< $maxscan;$i++) {
echo '<h1>'.$nb." ".$scenario[$nb]['file']."</h1>";
echo '<h2> description = '.$scenario[$nb]["desc"].'</h2>';
include '../scenario/'.$scenario[$nb]['file'];
include $scenario[$nb]['file'];
echo '</div>';
echo '</div>';
$end_mem=memory_get_usage();
@ -245,6 +251,8 @@ else if ($script=='all')
$get='test.php?'.http_build_query(array('script'=>"all", 'gDossier'=>$gDossierLogInput, 'nb_script'=>$nb));
echo '<a href="'.$get.'" target="_blank">';
echo $scenario[$nb]['file'];
echo '</a>';
}
}
}
else

View file

@ -36,9 +36,9 @@ function h($p_string)
{
return ( $p_string === null)?"":htmlspecialchars($p_string,ENT_QUOTES|ENT_HTML5,'UTF-8',true);
}
function p($p_string)
function p($p_string, $p_extra='')
{
return '<p>'.$p_string."</p>";
return '<p '.$p_extra.'>'.$p_string."</p.>";
}
function span($p_string, $p_extra='')
{
@ -1801,3 +1801,33 @@ function sanitize_filename($filename)
$new_filename=strtolower($filename_no)."-".date("Ymd-Hi").$filename_suff;
return $new_filename;
}
/**
* @brief convert some csv string (content of a file) into HTML table,
* @param $string CSV files
* @return void
*/
function csv2table ($string)
{
$a_field=[';',','];
$sep_field=$a_field[$_SESSION[SESSION_KEY.'csv_fieldsep']];
$a_field=['.',','];
$sep_dec=$a_field[$_SESSION[SESSION_KEY.'csv_decimal']];
$encoding=$_SESSION[SESSION_KEY.'csv_encoding'];
$aRow=explode("\r\n", $string);
echo '<table class="result">';
foreach ($aRow as $row) {
echo '<tr>';
$aCol=explode($sep_field, $row);
foreach ($aCol as $col) {
echo '<td>';
echo h($col);
echo '</td>';
}
echo '</tr>';
}
echo '</table>';
}

View file

@ -218,7 +218,7 @@ class Manage_Table_SQL
*/
function send_header()
{
header('Content-type:text/xml;charset="UTF-8"');
@header('Content-type:text/xml;charset="UTF-8"');
}
/**

View file

@ -77,11 +77,16 @@ class Noalyss_Csv
}
/***
*@brief Send an header for CSV , the filename is corrected
*@brief Send an header for CSV , the filename is corrected. If TEST_UNIT is defined, the function is called
* from a test file (located in scenario , see manual )and no header are requested
*/
function send_header()
{
$this->correct_name();
if ( defined('TEST_UNIT')) {
return;
}
header('Pragma: public');
header('Content-type: application/csv');
header("Content-Disposition: attachment;filename=\"{$this->filename}\"",

View file

@ -0,0 +1,70 @@
<?php
//@description: export export_histo_csv.php
$_GET=array (
'gDossier' => '25',
'ledger_type' => 'ALL',
'tag_option' => '0',
'act' => 'CSV:histo',
'viewsearch' => 'Export vers CSV',
'qcode' => '',
);
$_POST=array (
);
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
ob_start();
include NOALYSS_INCLUDE."/export/export_histo_csv.php";
$result=ob_get_contents();
ob_end_clean();
html_page_start();
if (trim($result) != '') {
echo p('result ok','class="alert-success"');
} else {
echo p('result failed','class="notice"');
}
echo h1('Tous les journaux');
csv2table($result);
echo h1('Achat 01.01.2019 - 31.12.2019');
$_GET=array (
'date_paid_start' => '',
'date_paid_end' => '',
'date_start' => '01.01.2019',
'date_end' => '31.12.2019',
'desc' => '',
'amount_min' => '0',
'amount_max' => '0',
'operation_filter' => 'all',
'accounting' => '',
'gDossier' => '25',
'ledger_type' => 'ACH',
'search_optag_option' => '0',
'p_currency_code' => '-1',
'tva_id_search' => '',
'tag_option' => '0',
'act' => 'CSV:histo',
'viewsearch' => 'Export vers CSV',
'qcode' => '',
);
$_POST=array (
);
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
ob_start();
include NOALYSS_INCLUDE."/export/export_histo_csv.php";
$result=ob_get_contents();
ob_end_clean();
html_page_start();
if (trim($result) != '') {
echo p('result ok','class="alert-success"');
} else {
echo p('result failed','class="notice"');
}
csv2table($result);

View file

@ -73,11 +73,16 @@ $core=$package_repository->make_object("core", "");
$core->download();
//download fake plugin
echo h1("Plugin : download and install ");
$plugin=$package_repository->make_object("plugin","COPRO");
$plugin->download();
echo h2("Install in noalyss/include/ext/copro-fake");
$plugin->install();
try {
echo h1("Plugin : download and install ");
$plugin=$package_repository->make_object("plugin","COPRO");
$plugin->download();
echo h2("Install in noalyss/include/ext/copro-fake");
$plugin->install();
} catch (\Exception $e) {
echo $e->getMessage();
}
echo h1("Available template");

View file

@ -63,7 +63,10 @@ $http=new HttpInput();
$input_switch->readOnly=TRUE;
echo $input_switch->input();
?>
<h2>InputCheckBox (Check Box)</h2>
<h2>EXPERIMENTAL InputCheckBox (Check Box)</h2>
<?php
require_once NOALYSS_INCLUDE.'/lib/input_checkbox.class.php';
?>
<ul>

View file

@ -0,0 +1,46 @@
<?php
/*
* This file is part of NOALYSS.
*
* PhpCompta is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* PhpCompta is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PhpCompta; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright (2002-2021) Author Dany De Bontridder <danydb@noalyss.eu>
if (!defined('ALLOWED'))
die('Appel direct ne sont pas permis');
/**
* @file
* @brief test Database Core
*/
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$cn=Dossier::connect();
echo h2(" Status IDLE");
echo $cn->status();
echo h2(" Status in begin ");
echo $cn->start();
echo $cn->status ();
echo "<br>";
$cn->get_value("select count(*) from jrnx");
echo $cn->status ();
echo PGSQL_TRANSACTION_INTRANS;
echo h2(" Status after rollback ");
echo $cn->commit();
echo $cn->status ();

View file

@ -0,0 +1,35 @@
<?php
/*
* Copyright (C) 2021 Dany De Bontridder <dany@alchimerys.be>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//@description:Test input SELECT ISELET for special chars
$select=new ISelect("select");
$select->value=array(
[ 'label'=>'Label "eco" > "aco" ', "value"=>'>'],
[ 'label'=>'Label "eco" > "aco" ', "value"=>'"'],
[ 'label'=>'<script>alert()</script>', "value"=>'<'],
[ 'label'=>'Label "eco" > "aco" ', "value"=>'>']
);
echo '<p>';
echo $select->input();
echo '</p>';

View file

@ -0,0 +1,62 @@
<?php
/*
* This file is part of NOALYSS.
*
* NOALYSS is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* NOALYSS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NOALYSS; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright Author Dany De Bontridder danydb@aevalys.eu 19/11/22
//@description:Test the textarea , especially the Enrich function
/*!
* \file
* \brief Test the textarea , especially the Enrich function
*/
$http=new HttpInput();
echo '<div class="nicEdit-main">';
echo $http->post("enrich","raw","");
echo $http->post("enrich2","text","");
echo $http->post("enrich3","raw","");
print_r($_POST);
echo '</div>';
?>
<h1>Format Area</h1>
<form method="post">
<?php
$itext=new \ITextarea("enrich");
$itext->value= $http->post("enrich","raw","");
$itext->set_enrichText("enrich");
echo $itext->input();
?>
<hr>
<h1>Plain Area</h1>
<?php
$itext=new \ITextarea("enrich2");
$itext->value= strip_tags($http->post("enrich2","raw",""));
$itext->set_enrichText("plain");
echo $itext->input();
?>
<p>
<input type="submit" value="Valider">
</p>
</form>

View file

@ -0,0 +1,45 @@
<?php
/*
* This file is part of NOALYSS.
*
* PhpCompta is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* PhpCompta is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PhpCompta; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright (2002-2020) Author Dany De Bontridder <danydb@noalyss.eu>
if (!defined('ALLOWED'))
die('Appel direct ne sont pas permis');
/**
* @file
* @brief test the select_dialog class
* @see Select_Dialog
*/
require_once NOALYSS_INCLUDE."/lib/select_dialog.class.php";
$selbox=new Select_Dialog("action_add_action2", _("Ajout action"));
$aDocumentType=$cn->get_array("select dt_id,dt_value from document_type order by 2");
$nbDocumentType=count($aDocumentType);
$dossier_id=Dossier::id();
for ($i=0; $i<$nbDocumentType; $i++)
{
$selbox->add_url($aDocumentType[$i]['dt_value'],
"do.php?".http_build_query([
"gDossier"=>$dossier_id,
"sa"=>"update",
"add_action_here"=>"yes",
"action_type"=>$aDocumentType[$i]["dt_id"]]));
}
echo $selbox->input();

View file

@ -0,0 +1,111 @@
<?php
//@description:Test des <b>dialog box avec different elements </b>comme autocomplete , IDate, SelectBox pour règler problème de positionnement quand on défile (scroll) les éléments
/*
* Copyright (C) 2021 Dany De Bontridder <dany@alchimerys.be>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
?>
<script>
var i=0;
function add_datalist_element() {
i++;
console.debug("compteur "+i) ;
var element=document.getElementById("datalist-exemple");
console.debug(element);
var option=document.createElement("option");
option.value="toto "+i;
console.debug(option);
element.appendChild(option);
}
</script>
<div class="inner_box" id="demo_box">
<?=HtmlInput::title_box("Innerbox example", "demo_box","hide");?>
<div>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<input list="datalist-exemple" id="dte" name="dte"/>
<datalist id="datalist-exemple">
<option value="chocolate">
<option value="Mars">
<option value="Vénus">
<option value="Accepter">
<option value="Forcer">
<option value="Voiture">
</datalist>
<button onclick="add_datalist_element()">Ajout element datalist</button>
<h1>Select Box</h1>
<?php
require_once NOALYSS_INCLUDE.'/lib/select_box.class.php';
$a=new Select_Box(uniqid("test"),"position in-absolute click me !");
$a->set_position("in-absolute");
$a->add_url("List (link)","?id=5&".Dossier::get());
$a->add_javascript("Hello (Javascript)","alert('hello')");
$a->add_value("Value = 10 (set value)",10);
$a->add_value("Value = 1 (set value)",1);
$a->add_value("Value = 15 (set value)",15);
echo $a->input();
?>
<h2>Select Box</h2>
<div>
<p>include 'select-box-test.php';</p>
<?php
include 'select-box-test.php';
?>
<?php
include_once 'HtmlInput.test.php';
?>
</div>
</div>
<?=HtmlInput::button_hide("demo_box");?>
</div>
<button onclick="$('demo_box').show()" >Affiche boite</button>
<div class="content">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<p>
Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
</p>
<p>
Fusce convallis, mauris imperdiet gravida bibendum, nisl turpis suscipit mauris, sed placerat ipsum urna sed risus. In convallis tellus a mauris. Curabitur non elit ut libero tristique sodales. Mauris a lacus. Donec mattis semper leo. In hac habitasse platea dictumst. Vivamus facilisis diam at odio. Mauris dictum, nisi eget consequat elementum, lacus ligula molestie metus, non feugiat orci magna ac sem. Donec turpis. Donec vitae metus. Morbi tristique neque eu mauris. Quisque gravida ipsum non sapien. Proin turpis lacus, scelerisque vitae, elementum at, lobortis ac, quam. Aliquam dictum eleifend risus. In hac habitasse platea dictumst. Etiam sit amet diam. Suspendisse odio. Suspendisse nunc. In semper bibendum libero.
</p>
<p>
Proin nonummy, lacus eget pulvinar lacinia, pede felis dignissim leo, vitae tristique magna lacus sit amet eros. Nullam ornare. Praesent odio ligula, dapibus sed, tincidunt eget, dictum ac, nibh. Nam quis lacus. Nunc eleifend molestie velit. Morbi lobortis quam eu velit. Donec euismod vestibulum massa. Donec non lectus. Aliquam commodo lacus sit amet nulla. Cras dignissim elit et augue. Nullam non diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In hac habitasse platea dictumst. Aenean vestibulum. Sed lobortis elit quis lectus. Nunc sed lacus at augue bibendum dapibus.
</p>
<p>
Aliquam vehicula sem ut pede. Cras purus lectus, egestas eu, vehicula at, imperdiet sed, nibh. Morbi consectetuer luctus felis. Donec vitae nisi. Aliquam tincidunt feugiat elit. Duis sed elit ut turpis ullamcorper feugiat. Praesent pretium, mauris sed fermentum hendrerit, nulla lorem iaculis magna, pulvinar scelerisque urna tellus a justo. Suspendisse pulvinar massa in metus. Duis quis quam. Proin justo. Curabitur ac sapien. Nam erat. Praesent ut quam.
</p>
<p>
Vivamus commodo, augue et laoreet euismod, sem sapien tempor dolor, ac egestas sem ligula quis lacus. Donec vestibulum tortor ac lacus. Sed posuere vestibulum nisl. Curabitur eleifend fermentum justo. Nullam imperdiet. Integer sit amet mauris imperdiet risus sollicitudin rutrum. Ut vitae turpis. Nulla facilisi. Quisque tortor velit, scelerisque et, facilisis vel, tempor sed, urna. Vivamus nulla elit, vestibulum eget, semper et, scelerisque eget, lacus. Pellentesque viverra purus. Quisque elit. Donec ut dolor.
</p>
<p>
Duis volutpat elit et erat. In at nulla at nisl condimentum aliquet. Quisque elementum pharetra lacus. Nunc gravida arcu eget nunc. Nulla iaculis egestas magna. Aliquam erat volutpat. Sed pellentesque orci. Etiam lacus lorem, iaculis sit amet, pharetra quis, imperdiet sit amet, lectus. Integer quis elit ac mi aliquam pretium. Nullam mauris orci, porttitor eget, sollicitudin non, vulputate id, risus. Donec varius enim nec sem. Nam aliquam lacinia enim. Quisque eget lorem eu purus dignissim ultricies. Fusce porttitor hendrerit ante. Mauris urna diam, cursus id, mattis eget, tempus sit amet, risus. Curabitur eu felis. Sed eu mi. Nullam lectus mauris, luctus a, mattis ac, tempus non, leo. Cras mi nulla, rhoncus id, laoreet ut, ultricies id, odio.
</p>
<p>
Donec imperdiet. Vestibulum auctor tortor at orci. Integer semper, nisi eget suscipit eleifend, erat nisl hendrerit justo, eget vestibulum lorem justo ac leo. Integer sem velit, pharetra in, fringilla eu, fermentum id, felis. Vestibulum sed felis. In elit. Praesent et pede vel ante dapibus condimentum. Donec magna. Quisque id risus. Mauris vulputate pellentesque leo. Duis vulputate, ligula at venenatis tincidunt, orci nunc interdum leo, ac egestas elit sem ut lacus. Etiam non diam quis arcu egestas commodo. Curabitur nec massa ac massa gravida condimentum. Aenean id libero. Pellentesque vitae tellus. Fusce lectus est, accumsan ac, bibendum sed, porta eget, augue. Etiam faucibus. Quisque tempus purus eu ante.
</p>
</div>
<button onclick="$('demo_box').show()" >Affiche boite</button>

View file

@ -11,7 +11,6 @@ $_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();

View file

@ -11,7 +11,7 @@ $_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();

View file

@ -10,7 +10,6 @@ $_POST=array (
);
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
define ('TEST_UNIT',1);
ob_start();
include 'ajax_misc.php';
$output=ob_get_contents();

View file

@ -11,7 +11,6 @@ $_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();

View file

@ -47,6 +47,14 @@ Dans votre code, vous pouvez ajouter des portions de code ainsi
// exécuté uniquement si appelé pour les tests unitaires
}
Les répertoires :
----------------
HTML : vérification pour les fichiers inclus
LIB : concerne les libraries
XML : réponse de script ajax, réponse souvent en XML
LOCAL : vos propres scripts, pour vos développements, ne seront pas dans GIT
-----------------------
ENGLISH
-----------------------
@ -72,3 +80,10 @@ In your code, you can do
// executed only if calling script is test.php,
}
FOLDERS
----------------
HTML : test the files to include
LIB : concerns libraries
XML : ajax script response often XML or JSON
LOCAL : Your own scripts for developping , not included in GIT