Mercurial > hg > rc1
view vendor/sabre/vobject/tests/VObject/Property/ICalendar/RecurTest.php @ 35:05c4c32948af
.hgignore: add vendor tree
composer.json: new packages
plugins/thunderbird_labels/thunderbird_labels.php: change hook and RFC822 use wrt whitelisting to avoid deprecated stuff
index.php: commented debugging hooks
others: new releases of vendor packages?
| author | Charlie Root |
|---|---|
| date | Thu, 30 Aug 2018 16:21:59 -0400 |
| parents | 430dbd5346f7 |
| children |
line wrap: on
line source
<?php namespace Sabre\VObject\Property\ICalendar; use Sabre\VObject\Component\VCalendar; class RecurTest extends \PHPUnit_Framework_TestCase { function testParts() { $vcal = new VCalendar(); $recur = $vcal->add('RRULE', 'FREQ=Daily'); $this->assertInstanceOf('Sabre\VObject\Property\ICalendar\Recur', $recur); $this->assertEquals(array('FREQ'=>'DAILY'), $recur->getParts()); $recur->setParts(array('freq'=>'MONTHLY')); $this->assertEquals(array('FREQ'=>'MONTHLY'), $recur->getParts()); } /** * @expectedException \InvalidArgumentException */ function testSetValueBadVal() { $vcal = new VCalendar(); $recur = $vcal->add('RRULE', 'FREQ=Daily'); $recur->setValue(new \Exception()); } function testSetSubParts() { $vcal = new VCalendar(); $recur = $vcal->add('RRULE', array('FREQ'=>'DAILY', 'BYDAY'=>'mo,tu', 'BYMONTH' => array(0,1))); $this->assertEquals(array( 'FREQ'=>'DAILY', 'BYDAY' => array('MO','TU'), 'BYMONTH' => array(0,1), ), $recur->getParts()); } }
