phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] ipc_test_suite/inc/class.ipc_test_suite_calendar.inc


From: nomail
Subject: [Phpgroupware-cvs] ipc_test_suite/inc/class.ipc_test_suite_calendar.inc.php, 1.2
Date: Wed, 26 May 2004 16:36:25 +0200

Update of /ipc_test_suite/inc
Modified Files:
        Branch: 
          class.ipc_test_suite_calendar.inc.php

date: 2004/05/26 14:36:25;  author: mkaemmerer;  state: Exp;  lines: +180 -121

Log Message:
- updated
=====================================================================
Index: ipc_test_suite/inc/class.ipc_test_suite_calendar.inc.php
diff -u ipc_test_suite/inc/class.ipc_test_suite_calendar.inc.php:1.1 
ipc_test_suite/inc/class.ipc_test_suite_calendar.inc.php:1.2
--- ipc_test_suite/inc/class.ipc_test_suite_calendar.inc.php:1.1        Tue Dec 
23 16:23:57 2003
+++ ipc_test_suite/inc/class.ipc_test_suite_calendar.inc.php    Wed May 26 
14:36:25 2004
@@ -1,127 +1,186 @@
 <?php
-/**
- * IPC Test Suite
- *
- * @author      Dirk Schaller <address@hidden>
- * @copyright   Copyright (C) 2003 Free Software Foundation http://www.fsf.org/
- * @license     http://www.fsf.org/licenses/gpl.html GNU General Public License
- * @package     ipc_test_suite
- * @version     $Id$
- */
-
-/**
- * IPC test class for the calendar application
- *
- * @package  ipc_test_suite
- */
-class ipc_test_suite_calendar extends ipc_test_suite 
-{
        /**
-        * @var     object   $ipc  calendar ipc object
-        * @access  private
-        */
-       var $ipc;
-       
+       * IPC Test Suite
+       * @author Dirk Schaller <address@hidden>
+       * @copyright Copyright (C) 2000-2004 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
+       * @package ipc_test_suite
+       * @version $Id$
+       */
 
        /**
-        * @var     integer  $last_insert_id  last inserted id
-        * @access  private
-        */
-       var $last_insert_id;
-
-
-  /**
-   * Constructor
-   *
-   * @access  public
-        * @param   object  $$ipcManager  ipc manager object
-   */
-       function ipc_test_suite_calendar($params)
-       {
-               $this->ipc =& $params['ipcManager']->getIPC('calendar');
-
-               // test the following methods
-               // the test variable and test method is defined in the parent 
class!
-               $this->test = array(//'test_addData',
-                                   'test_getData'
-                                   //'test_replaceData',
-                                   //'test_getData',
-                                   //'test_existData',
-                                   //'test_removeData'
-               );
-       }
-
-//###########################################################################################
-
-  /**
-   * Test the ipc addData method
-   *
-   * @access  protected
-   */
-       function test_addData()
-       {
-               $data = array('calendar_title'       => 'test calendar',
-                             'calendar_description' => 'desc 123',
-                             'calendar_start_date'  => 1070838000,
-                             'calendar_end_date'    => 1070931600,
-                             'calendar_priority'    => 1,
-                             'calendar_status'      => 70,
-                             'calendar_access'      => 'public'
-               );
-               $type = 'application/x-phpgw-calendar';
-               $this->last_insert_id = $this->ipc->addData($data, $type);
-               return $this->last_insert_id;
-       }
-
-  /**
-   * Test the ipc getData method
-   *
-   * @access  protected
-   */
-       function test_getData()
-       {
-               $id   = 1; //$this->last_insert_id;
-               $type = 'text/x-vcal';
-               return $this->ipc->getData($id, $type);
-       }
-
-  /**
-   * Test the ipc replaceData method
-   *
-   * @access  protected
-   */
-       function test_replaceData()
-       {
-               $id = $this->last_insert_id;
-               $data = array('calendar_title'        => 'more calendar',
-                             'calendar_access'       => 'private',
-                             'calendar_description'  => 'short description 
here'
-               );
-               $type = 'application/x-phpgw-calendar';
-               return $this->ipc->replaceData($id, $data, $type);
-       }
-
-  /**
-   * Test the ipc removeData method
-   *
-   * @access  protected
-   */
-       function test_removeData()
-       {
-               $id = $this->last_insert_id;
-               return $this->ipc->removeData($id);
-       }
-
-  /**
-   * Test the ipc existData method
-   *
-   * @access  protected
-   */
-       function test_existData()
-       {
-               $id = $this->last_insert_id;
-               return $this->ipc->existData($id);
+       * IPC test class for the calendar application
+       * @package ipc_test_suite
+       */
+       class ipc_test_suite_calendar extends ipc_test_suite 
+       {
+               /**
+               * @var object $ipc calendar ipc object
+               * @access private
+               */
+               var $ipc;
+
+               /**
+               * @var integer $last_insert_id last inserted id
+               * @access private
+               */
+               var $last_insert_id;
+
+
+               /**
+               * Constructor
+               * @param object $params contains the ipc manager object and 
other data
+               */
+               function ipc_test_suite_calendar($params)
+               {
+                       $this->ipc =& $params['ipcManager']->getIPC('calendar');
+       
+                       // test the following methods
+                       // the test variable and test method is defined in the 
parent class!
+                       $this->test = array('test_addData',
+                                           'test_getData',
+                                           'test_getIdList',
+                                           'test_replaceData',
+                                           'test_getData',
+                                           'test_existData',
+                                           'test_removeData',
+                                           'test_getIdList'
+                       );
+               }
+
+         /**
+         * Test the ipc addData method
+         */
+               function test_addData()
+               {
+                       $data = 'BEGIN:VCALENDAR
+PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:Amsterdam, Berlin, Bern, Rom, Stockholm, Wien
+BEGIN:STANDARD
+DTSTART:20031026T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:Standard Time
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20040328T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:Daylight Savings Time
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTART;TZID="Amsterdam, Berlin, Bern, Rom, Stockholm, Wien":20040422T153000
+DTEND;TZID="Amsterdam, Berlin, Bern, Rom, Stockholm, Wien":20040422T160000
+RRULE:FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=22;WKST=SU
+LOCATION:ORT
+TRANSP:OPAQUE
+SEQUENCE:0
+UID:040000008200E00074C5B7101A82E00800000000E088344E8F19C4010000000000000000100
+ 0000036EA06C9FC037140AC935E3552FFEFEB
+DTSTAMP:20040403T183855Z
+DESCRIPTION:Dieser Testtermin heiÃ?t
+  "22_DAY_MONTHLY_BY_MONTHDAY_INT_2".\n\n
+SUMMARY:22_DAY_MONTHLY_BY_MONTHDAY_INT_2
+PRIORITY:5
+CLASS:PUBLIC
+END:VEVENT
+END:VCALENDAR
+';
+                       $type = 'text/calendar';
+                       $this->last_insert_id = $this->ipc->addData($data, 
$type);
+                       return $this->last_insert_id;
+               }
+
+         /**
+         * Test the ipc getData method
+         */
+               function test_getData()
+               {
+                       $id   = $this->last_insert_id;
+                       $type = 'text/x-ical';
+                       return $this->ipc->getData($id, $type);
+               }
+
+         /**
+         * Test the ipc getIdList method
+         */
+               function test_getIdList()
+               {
+                       return 
$this->ipc->getIdList(mktime(17,00,00,3,16,2004));
+                       return $this->ipc->getIdList(); // get all data id's
+               }
+
+         /**
+         * Test the ipc replaceData method
+         */
+               function test_replaceData()
+               {
+                       $id = 13; //$this->last_insert_id;
+                       $data = 'BEGIN:VCALENDAR
+PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:Amsterdam, Berlin, Bern, Rom, Stockholm, Wien
+BEGIN:STANDARD
+DTSTART:20031026T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:Standard Time
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20040328T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:Daylight Savings Time
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTART;TZID="Amsterdam, Berlin, Bern, Rom, Stockholm, Wien":20040415T153000
+DTEND;TZID="Amsterdam, Berlin, Bern, Rom, Stockholm, Wien":20040415T160000
+RRULE:FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=15;WKST=SU
+LOCATION:ORT
+TRANSP:OPAQUE
+SEQUENCE:0
+UID:040000008200E00074C5B7101A82E00800000000E088344E8F19C4010000000000000000100
+ 0000036EA06C9FC037140AC935E3552FFEFEB
+DTSTAMP:20040403T184839Z
+DESCRIPTION:Dieser Testtermin heiÃ?t
+  "15_DAY_MONTHLY_BY_MONTHDAY_INT_1".\n\n
+SUMMARY:15_DAY_MONTHLY_BY_MONTHDAY_INT_1
+PRIORITY:5
+CLASS:PUBLIC
+END:VEVENT
+END:VCALENDAR
+';
+                       $type = 'text/calendar';
+                       return $this->ipc->replaceData($id, $data, $type);
+               }
+
+         /**
+         * Test the ipc removeData method
+         */
+               function test_removeData()
+               {
+                       $id = $this->last_insert_id;
+                       return $this->ipc->removeData($id);
+               }
+
+         /**
+         * Test the ipc existData method
+         */
+               function test_existData()
+               {
+                       $id = $this->last_insert_id;
+                       return $this->ipc->existData($id);
+               }
        }
-
-}
 ?>




reply via email to

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