[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r5663 - in phpcompta/tags/rel671: html include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r5663 - in phpcompta/tags/rel671: html include |
Date: |
Thu, 9 Jan 2014 16:40:48 +0100 (CET) |
Author: danydb
Date: 2014-01-09 16:40:48 +0100 (Thu, 09 Jan 2014)
New Revision: 5663
Modified:
phpcompta/tags/rel671/html/test.php
phpcompta/tags/rel671/include/class_acc_operation.php
Log:
Update unit test
Modified: phpcompta/tags/rel671/html/test.php
===================================================================
--- phpcompta/tags/rel671/html/test.php 2014-01-09 12:30:08 UTC (rev 5662)
+++ phpcompta/tags/rel671/html/test.php 2014-01-09 15:40:48 UTC (rev 5663)
@@ -40,6 +40,12 @@
}
html_page_start();
+function start_test($p_array)
+{
+ echo '<h1>'.$p_array['desc'].'</h1>';
+ require $p_array['file'];
+ call_user_func($p_array['function']);
+}
// Test the connection
echo __FILE__.":".__LINE__;
print_r($_REQUEST);
@@ -52,10 +58,17 @@
$cn=new Database($_GET['gDossier']);
$a_route[]=array('desc'=>'test sur les menus par
défauts','file'=>'class_default_menu.php','function'=>'Default_Menu::test_me');
-
-for ($i=0;$i< count($a_route);$i++)
+$a_route[]=array('desc'=>'test sur
Acc_Operations','file'=>'class_acc_operation.php','function'=>'Acc_Operation::test_me');
+$a_route[]=array('desc'=>'test sur
INVOICING','file'=>'../include/ext/invoicing/include/class_acc_ledger_sold_generate.php','function'=>'Acc_Ledger_Sold_Generate::test_me');
+$called=HtmlInput::default_value_get("called", -1);
+if ($called == -1 )
{
- echo '<h1>'.$a_route[$i]['desc'].'</h1>';
- require $a_route[$i]['file'];
- call_user_func($a_route[$i]['function']);
+ for ($i=0;$i< count($a_route);$i++)
+ {
+ start_test($a_route[$i]);
+ }
+}
+ else
+{
+ start_test($a_route[$called]);
}
\ No newline at end of file
Modified: phpcompta/tags/rel671/include/class_acc_operation.php
===================================================================
--- phpcompta/tags/rel671/include/class_acc_operation.php 2014-01-09
12:30:08 UTC (rev 5662)
+++ phpcompta/tags/rel671/include/class_acc_operation.php 2014-01-09
15:40:48 UTC (rev 5663)
@@ -566,12 +566,13 @@
{
$_SESSION['g_user']='phpcompta';
$_SESSION['g_pass']='dany';
-
+ global $g_user;
$cn=new Database(dossier::id());
+ $g_user=new User($cn);
$a=new Acc_Operation($cn);
- $a->jr_id=11;
+ $a->jr_id=1444;
$b=$a->get_quant();
- var_dump($b->det);
+ var_dump($b);
}
}
/////////////////////////////////////////////////////////////////////////////
@@ -653,6 +654,7 @@
FROM quant_sold join jrnx using(j_id) where j_grpt=$1";
$this->det->array=$this->db->get_array($sql,array($this->det->jr_grpt_id));
}
+
}
/////////////////////////////////////////////////////////////////////////////
/**
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r5663 - in phpcompta/tags/rel671: html include,
phpcompta-dev <=