Definition at line 9 of file VFreeBusyTest.php.
◆ testIsFree()
Sabre\VObject\Component\VFreeBusyTest::testIsFree |
( |
| ) |
|
Definition at line 11 of file VFreeBusyTest.php.
References Sabre\VObject\$input, $tz, and Sabre\VObject\Reader\read().
16 FREEBUSY;FBTYPE=FREE:20120912T000500Z/PT1H
17 FREEBUSY;FBTYPE=BUSY:20120912T010000Z/20120912T020000Z
18 FREEBUSY;FBTYPE=BUSY-TENTATIVE:20120912T020000Z/20120912T030000Z
19 FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20120912T030000Z/20120912T040000Z
20 FREEBUSY;FBTYPE=BUSY:20120912T050000Z/20120912T060000Z,20120912T080000Z/20120912T090000Z
21 FREEBUSY;FBTYPE=BUSY:20120912T100000Z/PT1H
27 $vfb = $obj->VFREEBUSY;
29 $tz = new \DateTimeZone(
'UTC');
31 $this->assertFalse($vfb->isFree(
new \
DateTime(
'2012-09-12 01:15:00',
$tz),
new \
DateTime(
'2012-09-12 01:45:00',
$tz)));
32 $this->assertFalse($vfb->isFree(
new \
DateTime(
'2012-09-12 08:05:00',
$tz),
new \
DateTime(
'2012-09-12 08:10:00',
$tz)));
33 $this->assertFalse($vfb->isFree(
new \
DateTime(
'2012-09-12 10:15:00',
$tz),
new \
DateTime(
'2012-09-12 10:45:00',
$tz)));
36 $this->assertTrue($vfb->isFree(
new \
DateTime(
'2012-09-12 09:00:00',
$tz),
new \
DateTime(
'2012-09-12 09:15:00',
$tz)));
37 $this->assertTrue($vfb->isFree(
new \
DateTime(
'2012-09-12 09:45:00',
$tz),
new \
DateTime(
'2012-09-12 10:00:00',
$tz)));
38 $this->assertTrue($vfb->isFree(
new \
DateTime(
'2012-09-12 11:00:00',
$tz),
new \
DateTime(
'2012-09-12 12:00:00',
$tz)));
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
◆ testValidate()
Sabre\VObject\Component\VFreeBusyTest::testValidate |
( |
| ) |
|
The documentation for this class was generated from the following file: