Browse Source

Resolves ZF-1701
Wrote test testCalendarOnlineFeed() to test Zend_Gdata_Calendar::getCalendarEventFeed


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23875 44c647ce-9c0f-0410-b52a-842ac1e357ba

adamlundrigan 14 năm trước cách đây
mục cha
commit
7f51abce29
1 tập tin đã thay đổi với 9 bổ sung8 xóa
  1. 9 8
      tests/Zend/Gdata/CalendarOnlineTest.php

+ 9 - 8
tests/Zend/Gdata/CalendarOnlineTest.php

@@ -62,20 +62,21 @@ class Zend_Gdata_CalendarOnlineTest extends PHPUnit_Framework_TestCase
     }
 
     /**
-     * @see ZF-1701
+     * @group ZF-1701
      */
-    /*
     public function testCalendarOnlineFeed()
     {
         $eventFeed = $this->gdata->getCalendarEventFeed();
-        foreach ($eventFeed as $event) {
-            $title = $event->title;
-            $times = $event->when;
-            $location = $event->where;
-            $recurrence = $event->recurrence;
+        $this->assertTrue(strpos($eventFeed->title->text, TESTS_ZEND_GDATA_CLIENTLOGIN_EMAIL)
+                !== false);
+        $eventCount = 0;
+        foreach ( $eventFeed as $event ) {
+            $this->assertType('Zend_Gdata_Calendar_EventEntry', $event);
+            $eventCount++;
         }
+        $this->assertTrue($eventCount > 0 );
+        $this->assertTrue(count($eventFeed) == $eventCount);
     }
-    */
 
     function getEvent($eventId)
     {