phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] [18649] New test case that triggers some bug in calen


From: Johan Gunnarsson
Subject: [Phpgroupware-cvs] [18649] New test case that triggers some bug in calendar module.
Date: Tue, 15 Jul 2008 12:18:01 +0000

Revision: 18649
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18649
Author:   johang
Date:     2008-07-15 12:18:00 +0000 (Tue, 15 Jul 2008)

Log Message:
-----------
New test case that triggers some bug in calendar module.

Modified Paths:
--------------
    trunk/calendar/test/class.ipc_calendar_test.inc.php

Modified: trunk/calendar/test/class.ipc_calendar_test.inc.php
===================================================================
--- trunk/calendar/test/class.ipc_calendar_test.inc.php 2008-07-14 22:07:38 UTC 
(rev 18648)
+++ trunk/calendar/test/class.ipc_calendar_test.inc.php 2008-07-15 12:18:00 UTC 
(rev 18649)
@@ -240,5 +240,61 @@
 
                        // @todo test more properties
                }
+               
+               function test_overlapping_events()
+               {
+                       error_reporting(E_ALL);
+                       
+                       // First insert one event
+                       
+                       $id_first = $this->ipc->addData($this->sample_item,
+                               'application/x-phpgw-calendar');
+                       $data_first = $this->ipc->getData($id_first,
+                               'application/x-phpgw-calendar');
+
+                       $this->assertTrue($id_first);
+                       $this->assertEqual($data_first['title'],
+                               $this->sample_item['cal']['title']);
+                               
+                       /*
+                       first event:
+                       
+                       'start' => array(
+                               'str' => '2008/06/25',
+                               'hour' => '00',
+                               'min' => '09'
+                       ),
+                       'end' => array(
+                               'str' => '2008/06/25',
+                               'hour' => '00',
+                               'min' => '11'
+                       ),
+                       */
+                       
+                       // Build second event
+                       
+                       $overlapping_event = $this->simple_item;
+                       
+                       $overlapping_event['start']['min'] = '07';
+                       $overlapping_event['end']['min'] = '10';
+                       $overlapping_event['cal']['title'] = 'The Overlapping 
Event';
+                       
+                       // Then insert second event
+                       
+                       $id_second = $this->ipc->addData($overlapping_event,
+                               'application/x-phpgw-calendar');
+                       $data_second = $this->ipc->getData($id_second,
+                               'application/x-phpgw-calendar');
+
+                       $this->assertTrue($id_second);
+                       
+                       // This should be inserted as a new event which mean 
different
+                       // event IDs.
+                       
+                       $this->assertNotEqual($id_first, $id_second);
+                       
+                       $this->assertEqual($data_second['title'],
+                               $overlapping_event['cal']['title']);
+               }
        }
 ?>






reply via email to

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