Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1821591
RecurTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
1 KB
Subscribers
None
RecurTest.php
View Options
<?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
\V
Object
\P
roperty
\I
Calendar
\R
ecur'
,
$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
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Dec 24, 5:48 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
916769
Default Alt Text
RecurTest.php (1 KB)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment