[Pkg-owncloud-commits] [php-sabre-vobject] 05/46: add test for RDateIterator and timezones
David Prévot
taffit at moszumanska.debian.org
Thu Dec 10 02:12:37 UTC 2015
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 e6b3307d09760c18a5ed1d3608155dd1751807e6
Author: Jan Kantert <kantert at sra.uni-hannover.de>
Date: Wed Oct 14 21:03:55 2015 +0200
add test for RDateIterator and timezones
---
tests/VObject/Recur/RDateIteratorTest.php | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/VObject/Recur/RDateIteratorTest.php b/tests/VObject/Recur/RDateIteratorTest.php
index 2c9c7f1..7abf0e0 100644
--- a/tests/VObject/Recur/RDateIteratorTest.php
+++ b/tests/VObject/Recur/RDateIteratorTest.php
@@ -27,6 +27,30 @@ class RDateIteratorTest extends \PHPUnit_Framework_TestCase {
}
+ function testTimezone() {
+
+ $tz = new DateTimeZone('Europe/Berlin');
+ $it = new RDateIterator('20140901T000000,20141001T000000', new DateTimeImmutable('2014-08-01 00:00:00', $tz));
+
+ $expected = [
+ new DateTimeImmutable('2014-08-01 00:00:00', $tz),
+ new DateTimeImmutable('2014-09-01 00:00:00', $tz),
+ new DateTimeImmutable('2014-10-01 00:00:00', $tz),
+ ];
+
+ $result = iterator_to_array($it);
+
+ $this->assertEquals(
+ $expected,
+ iterator_to_array($it)
+ );
+
+
+ $this->assertFalse($it->isInfinite());
+
+ }
+
+
function testFastForward() {
$utc = new DateTimeZone('UTC');
--
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