[Pkg-owncloud-commits] [php-sabre-vobject] 69/106: Testing RDate.

David Prévot taffit at moszumanska.debian.org
Fri Aug 22 15:11:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabre-vobject.

commit dad9a8fa4221f5e4ef39e7ec7f1b7f17fa747914
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Thu Aug 7 01:34:46 2014 -0400

    Testing RDate.
---
 tests/VObject/Recur/RDateIteratorTest.php | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/tests/VObject/Recur/RDateIteratorTest.php b/tests/VObject/Recur/RDateIteratorTest.php
new file mode 100644
index 0000000..3916dce
--- /dev/null
+++ b/tests/VObject/Recur/RDateIteratorTest.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Sabre\VObject\Recur;
+
+use DateTime;
+use DateTimeZone;
+
+class RDateIteratorTest extends \PHPUnit_Framework_TestCase {
+
+    function testSimple() {
+
+        $utc = new DateTimeZone('UTC');
+        $it = new RDateIterator('20140901T000000Z,20141001T000000Z', new DateTime('2014-08-01 00:00:00', $utc));
+
+        $expected = array(
+            new DateTime('2014-08-01 00:00:00', $utc),
+            new DateTime('2014-09-01 00:00:00', $utc),
+            new DateTime('2014-10-01 00:00:00', $utc),
+        );
+
+        $this->assertEquals(
+            $expected,
+            iterator_to_array($it)
+        );
+
+
+    }
+
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list