1<?php
2
3namespace Sabre\VObject\Property\ICalendar;
4
5use Sabre\VObject\Component\VCalendar;
6use Sabre\VObject\Component\VEvent;
7
8class DurationTest extends \PHPUnit_Framework_TestCase {
9
10    function testGetDateInterval() {
11
12        $vcal = new VCalendar();
13        $event = $vcal->add('VEVENT', array('DURATION' => array('PT1H')));
14
15        $this->assertEquals(
16            new \DateInterval('PT1H'),
17            $event->{'DURATION'}->getDateInterval()
18        );
19    }
20}
21