[Pkg-owncloud-commits] [php-sabre-vobject] 06/341: All tests are passing.

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:25 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 e1fc81c86c5018e19413fdbc8dcf50e9561765d7
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Sat Sep 20 03:35:36 2014 +0100

    All tests are passing.
---
 lib/Property/VCard/DateAndOrTime.php              |  3 ++-
 tests/VObject/FreeBusyGeneratorTest.php           |  2 +-
 tests/VObject/Property/ICalendar/DateTimeTest.php | 14 +++++++-------
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/lib/Property/VCard/DateAndOrTime.php b/lib/Property/VCard/DateAndOrTime.php
index d3343b6..d0eb0ef 100644
--- a/lib/Property/VCard/DateAndOrTime.php
+++ b/lib/Property/VCard/DateAndOrTime.php
@@ -7,6 +7,7 @@ use Sabre\VObject\Property\Text;
 use Sabre\VObject\Property;
 use DateTimeInterface;
 use DateTimeImmutable;
+use DateTime;
 
 /**
  * DateAndOrTime property
@@ -127,7 +128,7 @@ class DateAndOrTime extends Property {
     function getDateTime() {
 
         $dts = [];
-        $now = new DateTimeImmutable();
+        $now = new DateTime();
 
         $tzFormat = $now->getTimezone()->getOffset($now)===0?'\\Z':'O';
         $nowParts = DateTimeParser::parseVCardDateTime($now->format('Ymd\\This' . $tzFormat));
diff --git a/tests/VObject/FreeBusyGeneratorTest.php b/tests/VObject/FreeBusyGeneratorTest.php
index 28e5acf..917fb3f 100644
--- a/tests/VObject/FreeBusyGeneratorTest.php
+++ b/tests/VObject/FreeBusyGeneratorTest.php
@@ -174,7 +174,7 @@ ICS;
             $blob2,
             $blob3,
             $blob4,
-            $blob6,
+            $blob5,
             $blob6,
             $blob7,
             $blob8,
diff --git a/tests/VObject/Property/ICalendar/DateTimeTest.php b/tests/VObject/Property/ICalendar/DateTimeTest.php
index 3cf2143..ffa4194 100644
--- a/tests/VObject/Property/ICalendar/DateTimeTest.php
+++ b/tests/VObject/Property/ICalendar/DateTimeTest.php
@@ -168,7 +168,7 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase {
     function testGetDateTimeCached() {
 
         $tz = new \DateTimeZone('Europe/Amsterdam');
-        $dt = new \DateTime('1985-07-04 01:30:00', $tz);
+        $dt = new \DateTimeImmutable('1985-07-04 01:30:00', $tz);
         $dt->setTimeZone($tz);
 
         $elem = $this->vcal->createProperty('DTSTART');
@@ -192,7 +192,7 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase {
         $elem = $this->vcal->createProperty('DTSTART','19850704');
         $dt = $elem->getDateTime();
 
-        $this->assertInstanceOf('DateTime', $dt);
+        $this->assertInstanceOf('DateTimeImmutable', $dt);
         $this->assertEquals('1985-07-04 00:00:00', $dt->format('Y-m-d H:i:s'));
 
     }
@@ -203,7 +203,7 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase {
         $elem = $this->vcal->createProperty('DTSTART','19850704T013000');
         $dt = $elem->getDateTime();
 
-        $this->assertInstanceOf('DateTime', $dt);
+        $this->assertInstanceOf('DateTimeImmutable', $dt);
         $this->assertEquals('1985-07-04 01:30:00', $dt->format('Y-m-d H:i:s'));
 
     }
@@ -213,7 +213,7 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase {
         $elem = $this->vcal->createProperty('DTSTART','19850704T013000Z');
         $dt = $elem->getDateTime();
 
-        $this->assertInstanceOf('DateTime', $dt);
+        $this->assertInstanceOf('DateTimeImmutable', $dt);
         $this->assertEquals('1985-07-04 01:30:00', $dt->format('Y-m-d H:i:s'));
         $this->assertEquals('UTC', $dt->getTimeZone()->getName());
 
@@ -226,7 +226,7 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase {
 
         $dt = $elem->getDateTime();
 
-        $this->assertInstanceOf('DateTime', $dt);
+        $this->assertInstanceOf('DateTimeImmutable', $dt);
         $this->assertEquals('1985-07-04 01:30:00', $dt->format('Y-m-d H:i:s'));
         $this->assertEquals('Europe/Amsterdam', $dt->getTimeZone()->getName());
 
@@ -260,7 +260,7 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase {
 
         $dt = $elem->getDateTime();
 
-        $this->assertInstanceOf('DateTime', $dt);
+        $this->assertInstanceOf('DateTimeImmutable', $dt);
         $this->assertEquals('1985-07-04 01:30:00', $dt->format('Y-m-d H:i:s'));
         $this->assertEquals('Europe/Amsterdam', $dt->getTimeZone()->getName());
 
@@ -288,7 +288,7 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase {
 
         $dt = $elem->getDateTime();
 
-        $this->assertInstanceOf('DateTime', $dt);
+        $this->assertInstanceOf('DateTimeImmutable', $dt);
         $this->assertEquals('1985-07-04 01:30:00', $dt->format('Y-m-d H:i:s'));
         $this->assertEquals('Canada/Eastern', $dt->getTimeZone()->getName());
         date_default_timezone_set($default);

-- 
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