diff options
author | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
commit | 0b02a6d123b2014705998c94ddf3d460948d3eac (patch) | |
tree | 78ff2cab9944a4f5ab3f80ec93cbe1120de90bb2 /vendor/sabre/vobject/tests/Sabre/VObject/Component/VFreeBusyTest.php | |
parent | 40b5b6e9d2da7ab65c8b4d38cdceac83a4d78deb (diff) | |
download | volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.gz volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.bz2 volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.zip |
initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import)
Diffstat (limited to 'vendor/sabre/vobject/tests/Sabre/VObject/Component/VFreeBusyTest.php')
-rw-r--r-- | vendor/sabre/vobject/tests/Sabre/VObject/Component/VFreeBusyTest.php | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/vendor/sabre/vobject/tests/Sabre/VObject/Component/VFreeBusyTest.php b/vendor/sabre/vobject/tests/Sabre/VObject/Component/VFreeBusyTest.php deleted file mode 100644 index 031c3c684..000000000 --- a/vendor/sabre/vobject/tests/Sabre/VObject/Component/VFreeBusyTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -namespace Sabre\VObject\Component; -use Sabre\VObject; - -class VFreeBusyTest extends \PHPUnit_Framework_TestCase { - - function testIsFree() { - - $input = <<<BLA -BEGIN:VCALENDAR -BEGIN:VFREEBUSY -FREEBUSY;FBTYPE=FREE:20120912T000500Z/PT1H -FREEBUSY;FBTYPE=BUSY:20120912T010000Z/20120912T020000Z -FREEBUSY;FBTYPE=BUSY-TENTATIVE:20120912T020000Z/20120912T030000Z -FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20120912T030000Z/20120912T040000Z -FREEBUSY;FBTYPE=BUSY:20120912T050000Z/20120912T060000Z,20120912T080000Z/20120912T090000Z -FREEBUSY;FBTYPE=BUSY:20120912T100000Z/PT1H -END:VFREEBUSY -END:VCALENDAR -BLA; - - $obj = VObject\Reader::read($input); - $vfb = $obj->VFREEBUSY; - - $tz = new \DateTimeZone('UTC'); - - $this->assertFalse($vfb->isFree(new \DateTime('2012-09-12 01:15:00', $tz), new \DateTime('2012-09-12 01:45:00', $tz))); - $this->assertFalse($vfb->isFree(new \DateTime('2012-09-12 08:05:00', $tz), new \DateTime('2012-09-12 08:10:00', $tz))); - $this->assertFalse($vfb->isFree(new \DateTime('2012-09-12 10:15:00', $tz), new \DateTime('2012-09-12 10:45:00', $tz))); - - // Checking whether the end time is treated as non-inclusive - $this->assertTrue($vfb->isFree(new \DateTime('2012-09-12 09:00:00', $tz), new \DateTime('2012-09-12 09:15:00', $tz))); - $this->assertTrue($vfb->isFree(new \DateTime('2012-09-12 09:45:00', $tz), new \DateTime('2012-09-12 10:00:00', $tz))); - $this->assertTrue($vfb->isFree(new \DateTime('2012-09-12 11:00:00', $tz), new \DateTime('2012-09-12 12:00:00', $tz))); - - } - -} |