ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
PluginTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\CalDAV\Subscriptions
;
4
5
use
Sabre\DAV\PropFind
;
6
7
class
PluginTest
extends
\PHPUnit_Framework_TestCase
{
8
9
function
testInit
() {
10
11
$server
= new \Sabre\DAV\Server();
12
$plugin
=
new
Plugin
();
13
14
$server
->addPlugin(
$plugin
);
15
16
$this->assertEquals(
17
'{http://calendarserver.org/ns/}subscribed'
,
18
$server
->resourceTypeMapping[
'Sabre\\CalDAV\\Subscriptions\\ISubscription'
]
19
);
20
$this->assertEquals(
21
'Sabre\\DAV\\Xml\\Property\\Href'
,
22
$server
->xml->elementMap[
'{http://calendarserver.org/ns/}source'
]
23
);
24
25
$this->assertEquals(
26
[
'calendarserver-subscribed'
],
27
$plugin
->getFeatures()
28
);
29
30
$this->assertEquals(
31
'subscriptions'
,
32
$plugin
->getPluginInfo()[
'name'
]
33
);
34
35
}
36
37
function
testPropFind
() {
38
39
$propName =
'{http://calendarserver.org/ns/}subscribed-strip-alarms'
;
40
$propFind =
new
PropFind
(
'foo'
, [$propName]);
41
$propFind->set($propName, null, 200);
42
43
$plugin
=
new
Plugin
();
44
$plugin
->propFind($propFind,
new
\
Sabre
\DAV\
SimpleCollection
(
'hi'
));
45
46
$this->assertFalse(is_null($propFind->get($propName)));
47
48
}
49
50
}
Sabre\CalDAV\Plugin
CalDAV plugin.
Definition:
Plugin.php:28
Sabre\CalDAV\Subscriptions\PluginTest\testInit
testInit()
Definition:
PluginTest.php:9
Sabre\CalDAV\Subscriptions\PluginTest\testPropFind
testPropFind()
Definition:
PluginTest.php:37
Sabre\DAV\PropFind
This class holds all the information about a PROPFIND request.
Definition:
PropFind.php:11
Sabre\DAV\SimpleCollection
SimpleCollection.
Definition:
SimpleCollection.php:15
Sabre\CalDAV\PluginTest\$plugin
$plugin
Definition:
PluginTest.php:20
PHPUnit_Framework_TestCase
Sabre
Sabre\CalDAV\Subscriptions
Definition:
ISubscription.php:3
PropFind
Sabre\CalDAV\PluginTest
Definition:
PluginTest.php:11
php
Sabre\CalDAV\PluginTest\$server
$server
Definition:
PluginTest.php:16
libs
composer
vendor
sabre
dav
tests
Sabre
CalDAV
Subscriptions
PluginTest.php
Generated on Thu Jan 16 2025 19:01:51 for ILIAS by
1.8.13 (using
Doxyfile
)