noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 168/219: Task #1476 : prevent the use of some


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 168/219: Task #1476 : prevent the use of some accounting Code cleaning , remove obsolete files
Date: Mon, 18 Dec 2017 13:22:57 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit d4be11882584952d8587961f4f0543d03ba89ddb
Author: Dany De Bontridder <address@hidden>
Date:   Sun Nov 26 17:48:41 2017 +0100

    Task #1476 : prevent the use of some accounting
    Code cleaning , remove obsolete files
---
 doc/manuel-fr.odt                                 | Bin 297265 -> 297617 bytes
 html/js/card.js                                   |  22 ++-
 include/ajax/ajax_account_update.php              | 215 ----------------------
 include/ajax/ajax_card.php                        |  37 ++--
 include/ajax/ajax_pcmn_update.php                 | 111 -----------
 include/class/acc_ledger.class.php                |   4 +
 include/class/fiche.class.php                     |  45 ++++-
 unit-test/include/class/acc_accountTest.class.php | 144 ---------------
 8 files changed, 86 insertions(+), 492 deletions(-)

diff --git a/doc/manuel-fr.odt b/doc/manuel-fr.odt
index 3113753..8b8a066 100644
Binary files a/doc/manuel-fr.odt and b/doc/manuel-fr.odt differ
diff --git a/html/js/card.js b/html/js/card.js
index 591a6bd..7a78dd2 100644
--- a/html/js/card.js
+++ b/html/js/card.js
@@ -745,8 +745,16 @@ function save_card(obj)
                                   parameters:queryString,
                                   onFailure:errorFid,
                                   onSuccess:function (req,json) {
-                                      fill_box(req,json);
+                                     
                                       var 
elt=req.responseXML.getElementsByTagName("eltid");
+                                      var 
status=req.responseXML.getElementsByTagName("status");
+                                      var status_value='OK';
+                                      if ( status.length !=0) {
+                                        status_value=getNodeText(status[0]);
+                                      }
+                                      if ( status_value == 'OK') {
+                                             fill_box(req,json);
+                                      }
                                       remove_waiting_box();
                                       if ( elt.length != 0) {
                                          var eltid=getNodeText(elt[0]);
@@ -756,8 +764,16 @@ function save_card(obj)
                                             fill_data_onchange(eltid);
                                             $(eltid).focus();
                                         }
-                                         //$(content).fade({duration:2.0});    
 
-                                     Effect.SlideUp(content, { duration: 1.0 
});}    
+                                      }
+                                      if (status_value == "OK") {
+                                            Effect.SlideUp(content, { 
duration: 1.0 });    
+                                        }
+                                      if ( status_value == 'NOK') {
+                                          var 
xml_message=req.responseXML.getElementsByTagName("code");
+                                          var 
message=getNodeText(xml_message[0]);
+                                          smoke.alert(message);
+                                      }
+                                    
                                       
                                   }
                               }
diff --git a/include/ajax/ajax_account_update.php 
b/include/ajax/ajax_account_update.php
deleted file mode 100644
index c18529d..0000000
--- a/include/ajax/ajax_account_update.php
+++ /dev/null
@@ -1,215 +0,0 @@
-<?php
-
-/*
- *   This file is part of NOALYSS.
- *
- *   NOALYSS isfree 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 isdistributed 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 (2014) Author Dany De Bontridder <address@hidden>
-
-if (!defined('ALLOWED'))    die('Appel direct ne sont pas permis');
-
-/**
- * @file
- * @brief delete insert or update data from account_update (need right CFGPCMN)
- * called from ajax_misc.php
- * @param array
- * @code
- *   'op' => string 'account_update' (length=14)
-  'gDossier' => string '44' (length=2)
-  'action' => string 'update' (length=6)
-  'p_oldu' => string '4124' (length=4)
-  'p_valu' => string '4124' (length=4)
-  'p_libu' => string 'Impôt belge sur le résultat' (length=29)
-  'p_parentu' => string '412' (length=3)
-  'acc_delete' => string '0' (length=1)
-  'p_typeu' => string '0' (length=1)
- * @endcode
- */
-if ($g_user->check_module('CFGPCMN') == 0)
-                       exit();
-
-$var=array('action', 'p_oldu', 'p_valu', 'p_libu', 'p_parentu', 'acc_delete', 
'p_typeu');
-for ($i=0; $i<count($var); $i++)
-{
-    $name=$var[$i];
-    if (!isset($$name))
-        throw new Exception($name." is not set");
-}
-$ctl='ok';
-extract($_GET, EXTR_SKIP);
-//----------------------------------------------------------------------
-// Modification
-//----------------------------------------------------------------------
-$message=_("opération réussie");
-
-if ($action=="update" &&$acc_delete==0)
-{
-    // Check if the data are correct
-    try
-    {
-        $p_val=trim($p_valu);
-        $p_lib=trim($p_libu);
-        $p_parent=trim($p_parentu);
-        $old_line=trim($p_oldu);
-        $p_type=htmlentities($p_typeu);
-        $acc=new Acc_Account($cn);
-        $acc->set_parameter('libelle', $p_lib);
-        $acc->set_parameter('value', $p_val);
-        $acc->set_parameter('parent', $p_parent);
-        $acc->set_parameter('type', $p_type);
-        $acc->check();
-    }
-    catch (Exception $e)
-    {
-        $message=_("Valeurs invalides, pas de changement")." \n ".
-                $e->getMessage();
-        $ctl='nok';
-        record_log($e->getTraceAsString());
-    }
-    if (strlen($p_val)!=0&&strlen($p_lib)!=0&&strlen($old_line)!=0)
-    {
-        if (strlen($p_val)==1)
-        {
-            $p_parent=0;
-        }
-        else
-        {
-            if (strlen($p_parent)==0)
-            {
-                $p_parent=substr($p_val, 0, strlen($p_val)-1);
-            }
-        }
-        /* Parent existe */
-        $Ret=$cn->exec_sql("select pcm_val from tmp_pcmn where pcm_val=$1", 
array($p_parent));
-        if (($p_parent!=0&&Database::num_row($Ret)==0)||$p_parent==$old_line)
-        {
-            $message=_("Ne peut pas modifier; aucun poste parent");
-            $ctl='nok';
-        }
-        else
-        {
-            try
-            {
-                $acc->update($old_line);
-            }
-            catch (Exception $e)
-            {
-                $message=$e->getMessage();
-                $ctl='nok';
-                record_log($e->getTraceAsString());
-            }
-        }
-    }
-    else
-    {
-        $message=_('Update Valeurs invalides');
-        $ctl='nok';
-    }
-}
-//-----------------------------------------------------
-/* Ajout d'une ligne */
-if ($action=="new")
-{
-    $p_val=trim($p_valu);
-    $p_parent=trim($p_parentu);
-
-    if (isset($p_valu)&&isset($p_libu))
-    {
-        $p_val=trim($p_valu);
-
-        if (strlen($p_valu)!=0&&strlen($p_libu)!=0)
-        {
-            if (strlen($p_valu)==1)
-            {
-                $p_parentu=0;
-            }
-            else
-            {
-                if (strlen(trim($p_parentu))==0&&
-                        (string) $p_parentu!=(string) (int) $p_parentu)
-                {
-                    $p_parentu=substr($p_val, 0, strlen($p_valu)-1);
-                }
-            }
-            /* Parent existe */
-            $Ret=$cn->exec_sql("select pcm_val from tmp_pcmn where 
pcm_val=$1", array($p_parentu));
-            if ($p_parent!=0&&Database::num_row($Ret)==0)
-            {
-                $message=_(" Ne peut pas modifier; aucun poste parent");
-                $ctl='nok';
-            }
-            else
-            {
-                // Check if the account already exists
-
-                $Count=$cn->get_value("select count(*) from tmp_pcmn where 
pcm_val=$1", array($p_val));
-                if ($Count!=0)
-                {
-                    // Alert message account already exists
-                    $message=_("Ce poste existe déjà ");
-                    $ctl='nok';
-                }
-                else
-                {
-                    $Ret=$cn->exec_sql("insert into tmp_pcmn 
(pcm_val,pcm_lib,pcm_val_parent,pcm_type) values ($1,$2,$3,$4)", array($p_val, 
$p_libu, $p_parent, $p_typeu));
-                }
-            }
-        }
-        else
-        {
-            $message=_("Valeurs invalides ");
-            $ctl='nok';
-        }
-    }
-}
-
-//-----------------------------------------------------
-// Action == remove a line
-if ($action=="update"&&$acc_delete==1)
-{
-    /* Ligne a enfant */
-    $R=$cn->exec_sql("select pcm_val from tmp_pcmn where pcm_val_parent=$1", 
array($p_valu));
-    if (Database::num_row($R)!=0)
-    {
-        $message=_("Ne peut pas effacer le poste: d'autres postes en 
dépendent");
-        $ctl='nok';
-    }
-    else
-    {
-        /* Vérifier que le poste n'est pas utilisé qq part dans les journaux */
-        $Res=$cn->exec_sql("select * from jrnx where j_poste=$1", 
array($p_valu));
-        if (Database::num_row($Res)!=0)
-        {
-            $message=_("Ne peut pas effacer le poste: il est utilisé dans les 
journaux");
-            $ctl='nok';
-        }
-        else
-        {
-            $Del=$cn->exec_sql("delete from tmp_pcmn where pcm_val=$1", 
array($p_valu));
-        } // if Database::num_row
-    } // if Database::num_row
-} //$action == del
-$message=escape_xml($message);
- if ( ! headers_sent()) {     header('Content-type: text/xml; 
charset=UTF-8');} else { echo "HTML".unescape_xml($html);}
- 
- echo <<<EOF
-<?xml version="1.0" encoding="UTF-8"?>
-<data>
-<ctl>$ctl</ctl>
-<code>$message</code>
-</data>
-EOF;
-?>
diff --git a/include/ajax/ajax_card.php b/include/ajax/ajax_card.php
index 1ea6cbd..995fe75 100644
--- a/include/ajax/ajax_card.php
+++ b/include/ajax/ajax_card.php
@@ -335,25 +335,36 @@ case 'sc':
     if ( $g_user->check_action(FICADD)==1 )
     {
         $f=new Fiche($cn);
-        $f->insert($fd_id,$_POST);
-               $f->Get();
-        $html.='<h2 class="notice">'._('Fiche sauvée').'</h2>';
-        $html.=$f->Display(true);
-        $js="";
-        if ( isset( $_POST['ref'])) $js=create_script(' 
window.location.reload()');
-        $html.=$js;
-        if ( isset ($eltid)) {
-            // after adding a new card, we update some field
-            $extra="<eltid>$eltid</eltid>".
-                    "<elt_value>{$f->get_quick_code ()}</elt_value>";
-                    
+        $status="<status>OK</status>";
+        try {
+            $f->insert($fd_id,$_POST);
+            $f->Get();
+            $html.='<h2 class="notice">'._('Fiche sauvée').'</h2>';
+            $html.=$f->Display(true);
+            $js="";
+            if ( isset( $_POST['ref'])) $js=create_script(' 
window.location.reload()');
+            $html.=$js;
+            if ( isset ($eltid)) {
+                // after adding a new card, we update some field
+                $extra="<eltid>$eltid</eltid>".
+                        "<elt_value>{$f->get_quick_code ()}</elt_value>";
+
+            }
+            $extra.=$status;
+            $html.=HtmlInput::button_close($ctl);
+        } catch (Exception $exc) {
+            $html="<h2 class=\"error\">"._("Erreur sauvegarde")."</h2>";
+            $html.=$exc->getMessage();
+            $status="<status>NOK</status>";
+            $extra=$status;
         }
+       
     }
     else
     {
         $html.=alert(_('Action interdite'),true);
+        $html.=HtmlInput::button_close($ctl);
     }
-    $html.=HtmlInput::button_close($ctl);
     break;
     /*----------------------------------------------------------------------
      * Search a card
diff --git a/include/ajax/ajax_pcmn_update.php 
b/include/ajax/ajax_pcmn_update.php
deleted file mode 100644
index fb52736..0000000
--- a/include/ajax/ajax_pcmn_update.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?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 2015 Author Dany De Bontridder address@hidden
-// require_once '.php';
-if (!defined('ALLOWED'))
-    die('Appel direct ne sont pas permis');
-
-global $g_user, $cn, $g_parameter;
-
-// Security check if user can connect and update
-if ($g_user->check_module('CFGPCMN')==0)
-{
-    $html=h2(_('Action interdite'), ' class="notice"');
-    $html=escape_xml($html);
-
-    header('Content-type: text/xml; charset=UTF-8');
-    echo <<<EOF
-<?xml version="1.0" encoding="UTF-8"?>
-<data>
-<ctl>pcmn_update</ctl>
-<code>$html</code>
-<status>NOTALLOWED</status>
-</data>
-EOF;
-    return;
-}
-$http=new HttpInput();
-ob_start();
-try
-{
-
-
-    $pcmn_val=$http->get('value', "string");
-
-    $action='new';
-    $val=new IText('p_valu');
-    $parent=new IText('p_parentu');
-    $lib=new IText('p_libu');
-    $lib->size="60";
-    $type=new ISelect('p_typeu');
-    $type->value=Acc_Account::$type;
-
-    if ($pcmn_val!="")
-    {
-        $action='update';
-        /*
-         * Not empty, show the default value
-         */
-        $account=new Acc_Account($cn);
-        $account->set_parameter('value', $pcmn_val);
-        $account->load();
-
-        $val->value=$account->get_parameter('value');
-        $parent->value=$account->get_parameter('parent');
-        $lib->value=$account->get_parameter('libelle');
-        $type->selected=$account->get_parameter('type');
-    }
-
-    require NOALYSS_TEMPLATE.'/pcmn_update.php';
-    $response=ob_get_clean();
-    $html=escape_xml($response);
-    if (headers_sent())
-    {
-        echo $response;
-        echo $html;
-    }
-    else
-    {
-        header('Content-type: text/xml; charset=UTF-8');
-        echo <<<EOF
-<?xml version="1.0" encoding="UTF-8"?>
-<data>
-<ctl></ctl>
-<code>$html</code>
-<status>ok</status>
-</data>
-EOF;
-    }
-}
-catch (Exception $exc)
-{
-    $html=$exc->getMessage();
-    $html=escape_xml($html);
-    header('Content-type: text/xml; charset=UTF-8');
-    echo <<<EOF
-<?xml version="1.0" encoding="UTF-8"?>
-<data>
-<ctl></ctl>
-<code>$html</code>
-<status>NOTALLOWED</status>
-</data>
-EOF;
-}
diff --git a/include/class/acc_ledger.class.php 
b/include/class/acc_ledger.class.php
index 3289eb8..a2fda93 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -2018,6 +2018,10 @@ class Acc_Ledger extends jrn_def_sql
                     }
                     $msg[]=$str_msg;
                 }
+                $account=new Acc_Account($this->db,${"poste".$i});
+                if ( $account->get_parameter("pcm_direct_use") == "N") {
+                    throw new Exception(_("Utilisation directe interdite du 
poste comptable ${"poste".$i}"));
+                }
             }
         }
         $tot_deb=round($tot_deb, 4);
diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index fb464f0..21fead6 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -28,6 +28,7 @@ require_once NOALYSS_INCLUDE.'/lib/ihidden.class.php';
 require_once NOALYSS_INCLUDE.'/class/fiche_def.class.php';
 require_once NOALYSS_INCLUDE.'/lib/iposte.class.php';
 require_once NOALYSS_INCLUDE.'/class/acc_operation.class.php';
+require_once NOALYSS_INCLUDE.'/class/acc_account.class.php';
 
 /*! \file
  * \brief define Class fiche, this class are using
@@ -770,6 +771,7 @@ class Fiche
 
         try
         {
+            $this->cn->start();
             $sql=sprintf("insert into fiche(f_id,fd_id)".
                     " values (%d,%d)", $fiche_id, $p_fiche_def);
             $Ret=$this->cn->exec_sql($sql);
@@ -805,19 +807,26 @@ class Fiche
                     $v=mb_substr(sql_string($value), 0, 40);
                     try
                     {
-
+                        // Check that the accounting can be used directly
                         if (strlen(trim($v))!=0)
                         {
                             if (strpos($value, ',')==0)
                             {
                                 $v=$this->cn->get_value("select 
format_account($1)",
                                         array($value));
+                                
+                                // Check that the accounting can be used 
directly
+                                $acc_account=new Acc_Account($this->cn,$v);
+                                if 
($acc_account->get_parameter('pcm_direct_use') == 'N') {
+                                    throw new Exception(_("Utilisation directe 
interdite du poste comptable $v"));
+                                }
                             }
                             else
                             {
                                 $ac_array=explode(",", $value);
                                 if (count($ac_array)<>2)
-                                    throw new Exception('Désolé, il y a trop 
de virgule dans le poste comptable '.h($value));
+                                    throw new Exception(_('Désolé, il y a trop 
de virgule dans le poste comptable ').h($value));
+                                
                                 $part1=$ac_array[0];
                                 $part2=$ac_array[1];
                                 $part1=$this->cn->get_value('select 
format_account($1)',
@@ -825,6 +834,16 @@ class Fiche
                                 $part2=$this->cn->get_value('select 
format_account($1)',
                                         array($part2));
                                 $v=$part1.','.$part2;
+                                // Check that the accounting can be used 
directly
+                                $acc_account1=new 
Acc_Account($this->cn,$part1);
+                                if 
($acc_account1->get_parameter('pcm_direct_use') == 'N') {
+                                    throw new Exception(_("Utilisation directe 
interdite du poste comptable $part1"));
+                                }
+                                // Check that the accounting can be used 
directly
+                                $acc_account2=new 
Acc_Account($this->cn,$part2);
+                                if 
($acc_account2->get_parameter('pcm_direct_use') == 'N') {
+                                    throw new Exception(_("Utilisation directe 
interdite du poste comptable $part2"));
+                                }
                             }
                             $parameter=array($this->id, $v);
                         }
@@ -837,8 +856,7 @@ class Fiche
                     }
                     catch (Exception $e)
                     {
-                        throw new Exception("Erreur : ce compte [$v] n'a pas 
de compte parent.".
-                        "L'opération est annulée", 1);
+                        throw ($e);
                     }
                     continue;
                 }
@@ -863,6 +881,7 @@ class Fiche
                         $id, strip_tags(trim($value2)));
                 $this->cn->exec_sql($sql);
             }
+            $this->cn->commit();
         }
         catch (Exception $e)
         {
@@ -949,11 +968,26 @@ class Fiche
                             $part2=$this->cn->get_value('select 
format_account($1)',
                                     array($part2));
                             $v=$part1.','.$part2;
+                            // Check that the accounting can be used directly
+                            $acc_account1=new Acc_Account($this->cn,$part1);
+                            if ($acc_account1->get_parameter('pcm_direct_use') 
== 'N') {
+                                throw new Exception(_("Utilisation directe 
interdite du poste comptable $part1"));
+                            }
+                            // Check that the accounting can be used directly
+                            $acc_account2=new Acc_Account($this->cn,$part2);
+                            if ($acc_account2->get_parameter('pcm_direct_use') 
== 'N') {
+                                throw new Exception(_("Utilisation directe 
interdite du poste comptable $part2"));
+                            }
                         }
                         else
                         {
                             $v=$this->cn->get_value('select 
format_account($1)',
                                     array($value));
+                            // Check that the accounting can be used directly
+                            $acc_account=new Acc_Account($this->cn,$v);
+                            if ($acc_account->get_parameter('pcm_direct_use') 
== 'N') {
+                                throw new Exception(_("Utilisation directe 
interdite du poste comptable $v"));
+                            }
                         }
                         $sql=sprintf("select account_update(%d,'%s')",
                                 $this->id, $v);
@@ -963,8 +997,7 @@ class Fiche
                         }
                         catch (Exception $e)
                         {
-                            throw new Exception(__LINE__."Erreur : ce compte 
[$v] n'a pas de compte parent.".
-                            "L'op&eacute;ration est annul&eacute;e");
+                            throw new Exception(_("opération annulée")." 
".$e->getMessage());
                         }
                         continue;
                     }
diff --git a/unit-test/include/class/acc_accountTest.class.php 
b/unit-test/include/class/acc_accountTest.class.php
deleted file mode 100644
index 519f833..0000000
--- a/unit-test/include/class/acc_accountTest.class.php
+++ /dev/null
@@ -1,144 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-10-31 at 20:32:58.
- * @backupGlobals enabled
- */
-class Acc_AccountTest extends PHPUnit_Framework_TestCase
-{
-
-    /**
-     * @var Acc_Account
-     */
-    protected $object;
-
-    /**
-     * Sets up the fixture, for example, opens a network connection.
-     * This method is called before a test is executed.
-     *  @backupGlobals enabled
-     */
-    protected function setUp()
-    {
-        global $g_connection;
-        $_REQUEST['gDossier'] = DOSSIER;
-        $g_connection=new Database(DOSSIER);
-        $this->object=new Acc_Account($g_connection,400);
-        $this->object->load();
-    }
-
-    /**
-     * Tears down the fixture, for example, closes a network connection.
-     * This method is called after a test is executed.
-     */
-    protected function tearDown()
-    {
-        
-    }
-
-    /**
-     * @covers Acc_Account::get_parameter
-     * @todo   Implement testGet_parameter().
-     *  @backupGlobals enabled
-     */
-    public function testGet_parameter()
-    {
-       $value=$this->object->get_parameter("value");
-       $this->assertEquals($value,'400');
-               
-    }
-
-    /**
-     * @covers Acc_Account::set_parameter
-     * @todo   Implement testSet_parameter().
-     *  @backupGlobals enabled
-     */
-    public function testSet_parameter()
-    {
-        $this->object->set_parameter("value",500);
-        $value=$this->object->get_parameter("value");
-        $this->assertEquals($value,500);
-    }
-
-    /**
-     * @covers Acc_Account::get_lib
-     * @todo   Implement testGet_lib().
-     */
-    public function testGet_lib()
-    {
-        $value=$this->object->get_lib();
-        $this->assertEquals($value,'Clients');
-    }
-
-    /**
-     * @covers Acc_Account::check
-     * @todo   Implement testCheck().
-     */
-    public function testCheck()
-    {
-       $value=$this->object->check('pcm_val');
-        $this->assertTrue($value);
-        $value=$this->object->check('pcm_lib');
-        $this->assertTrue($value);
-        $value=$this->object->check('pcm_val_parent');
-        $this->assertTrue($value);
-        $value=$this->object->check('pcm_type','CHA');
-        $this->assertTrue($value);
-        $this->setExpectedException("Exception");
-        $value=$this->object->check('unknown');
-
-    }
-
-    /**
-     * @covers Acc_Account::load
-     * @todo   Implement testLoad().
-     */
-    public function testLoad()
-    {
-        $this->object->load();
-    }
-
-    /**
-     * @covers Acc_Account::form
-     * @todo   Implement testForm().
-     */
-    public function testForm()
-    {
-      $_REQUEST['gDossier']=36;
-      $this->object->form();
-    }
-
-    /**
-     * @covers Acc_Account::count
-     * @todo   Implement testCount().
-     */
-    public function testCount()
-    {
-        
-        $this->assertEquals($this->object->count('550'),1);
-        $this->assertEquals($this->object->count('500'),0);
-    }
-
-    /**
-     * @covers Acc_Account::test_me
-     * @todo   Implement testTest_me().
-     */
-    public function testTest_me()
-    {
-        // Remove the following lines when you implement this test.
-        $this->markTestIncomplete(
-                'This test has not been implemented yet.'
-        );
-    }
-
-    /**
-     * @covers Acc_Account::update
-     * @todo   Implement testUpdate().
-     */
-    public function testUpdate()
-    {
-        // Remove the following lines when you implement this test.
-        $this->markTestIncomplete(
-                'This test has not been implemented yet.'
-        );
-    }
-
-}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]