Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1842482
PluginTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
1 KB
Subscribers
None
PluginTest.php
View Options
<?php
namespace
Sabre\CalDAV\Subscriptions
;
use
Sabre\DAV\PropFind
;
class
PluginTest
extends
\PHPUnit_Framework_TestCase
{
function
testInit
()
{
$server
=
new
\Sabre\DAV\Server
();
$plugin
=
new
Plugin
();
$server
->
addPlugin
(
$plugin
);
$this
->
assertEquals
(
'{http://calendarserver.org/ns/}subscribed'
,
$server
->
resourceTypeMapping
[
'Sabre
\\
CalDAV
\\
Subscriptions
\\
ISubscription'
]
);
$this
->
assertEquals
(
'Sabre
\\
DAV
\\
Xml
\\
Property
\\
Href'
,
$server
->
xml
->
elementMap
[
'{http://calendarserver.org/ns/}source'
]
);
$this
->
assertEquals
(
[
'calendarserver-subscribed'
],
$plugin
->
getFeatures
()
);
$this
->
assertEquals
(
'subscriptions'
,
$plugin
->
getPluginInfo
()[
'name'
]
);
}
function
testPropFind
()
{
$propName
=
'{http://calendarserver.org/ns/}subscribed-strip-alarms'
;
$propFind
=
new
PropFind
(
'foo'
,
[
$propName
]);
$propFind
->
set
(
$propName
,
null
,
200
);
$plugin
=
new
Plugin
();
$plugin
->
propFind
(
$propFind
,
new
\Sabre\DAV\SimpleCollection
(
'hi'
));
$this
->
assertFalse
(
is_null
(
$propFind
->
get
(
$propName
)));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jan 8, 6:49 AM (2 d, 7 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914200
Default Alt Text
PluginTest.php (1 KB)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment