view vendor/sabre/vobject/tests/VObject/Property/ICalendar/DurationTest.php @ 7:430dbd5346f7

vendor sabre as distributed
author Charlie Root
date Sat, 13 Jan 2018 09:06:10 -0500
parents
children
line wrap: on
line source

<?php

namespace Sabre\VObject\Property\ICalendar;

use Sabre\VObject\Component\VCalendar;
use Sabre\VObject\Component\VEvent;

class DurationTest extends \PHPUnit_Framework_TestCase {

    function testGetDateInterval() {

        $vcal = new VCalendar();
        $event = $vcal->add('VEVENT', array('DURATION' => array('PT1H')));

        $this->assertEquals(
            new \DateInterval('PT1H'),
            $event->{'DURATION'}->getDateInterval()
        );
    }
}