phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] api/class.qa.php, 1.1.2.1


From: nomail
Subject: [Phpgroupware-cvs] api/class.qa.php, 1.1.2.1
Date: Mon, 28 Jun 2004 23:15:38 +0200

Update of /api
Added Files:
        Branch: proposal-branch
          class.qa.php

date: 2004/06/28 21:15:38;  author: jengo;  state: Exp;  lines: +81 -0

Log Message:
I created a new class in the api called qa. In the future, there will be a tool 
that will allow developers to check that important API methods are returning 
the proper results. This should help things remain more stable once its in use.

This will test all interfaces (SOAP, XML-RPC, browser), since most of the tests 
are geared towards them. Most of these tests are very simple, but could detect 
big problems that would otherwise go un-noticed.

Futher info is in the wiki changelog
=====================================================================
<?php
        
/**************************************************************************\
        * phpGroupWare                                                          
   *
        * http://www.phpgroupware.org                                           
   *
        * This file written by Joseph Engo <address@hidden>                *
        * Copyright (C) 2004 Joseph Engo
        * 
-------------------------------------------------------------------------*
        * This library is part of the phpGroupWare API                          
   *
        * http://www.phpgroupware.org/api                                       
   * 
        * 
------------------------------------------------------------------------ *
        * This library is free software; you can redistribute it and/or modify 
it  *
        * under the terms of the GNU Lesser General Public License as published 
by *
        * the Free Software Foundation; either version 2.1 of the License,      
   *
        * or any later version.                                                 
   *
        * This library 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 Lesser General Public License for more details.           
   *
        * You should have received a copy of the GNU Lesser General Public 
License *
        * along with this library; if not, write to the Free Software 
Foundation,  *
        * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA         
   *
        
\**************************************************************************/

        /* $Id: class.qa.php,v 1.1.2.1 2004/06/28 21:15:38 jengo Exp $ */
        /* $Source: /cvsroot/phpgroupware/api/Attic/class.qa.php,v $ */

        // This class is a series of methods used to test and verify methods in 
the phpGW API
        // For this to work properly, you must create a development database in 
setup
        // This is a future requirement, currently a pre-set database doesn't 
exist for it
        // but it will in time. (jengo)

        class api_qa
        {
                function _protected()
                {
                        return 'You should *NOT* get this response back';
                }

                function __private()
                {
                        return 'You should *NOT* get this response back';
                }

                function trigger_error()
                {
                        trigger_error('Test error',E_USER_WARNING);
                }

                function sql_error()
                {
                        $GLOBALS['phpgw']->db->execute("Hi, this is an SQL 
query error");
                }

                function boolean()
                {
                        return true;
                }

                function string()
                {
                        return 'Test string';
                }

                function integer()
                {
                        return 1234567890;
                }

                function float()
                {
                        return (float)123456789012345678901234567890;
                }

                function base64()
                {
                        return base64_encode('Test string');
                }



        }




reply via email to

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